FIX: ActionMailbox test helper argument list

`receive_inbound_email_from_source` should accept an argument list
(`*args`) instead, to allow for the `source` argument in
`create_inbound_email_from_source`.

```ruby
receive_inbound_email_from_source(source, status: :processing)
```

Accepting a keyword argument list (`**kwargs`) results in an
`ArgumentError`

```text
ArgumentError: wrong number of arguments (given 1, expected 0)
```
This commit is contained in:
Kyle Zhao 2019-04-09 00:38:50 -04:00
parent e485c14a3e
commit 4a9f2a746e

@ -29,16 +29,16 @@ def receive_inbound_email_from_fixture(*args)
create_inbound_email_from_fixture(*args).tap(&:route)
end
# Create an +InboundEmail+ from fixture using the same arguments as +create_inbound_email_from_mail+
# and immediately route it to processing.
# Create an +InboundEmail+ using the same arguments as +create_inbound_email_from_mail+ and immediately route it to
# processing.
def receive_inbound_email_from_mail(**kwargs)
create_inbound_email_from_mail(**kwargs).tap(&:route)
end
# Create an +InboundEmail+ from fixture using the same arguments as +create_inbound_email_from_source+
# and immediately route it to processing.
def receive_inbound_email_from_source(**kwargs)
create_inbound_email_from_source(**kwargs).tap(&:route)
# Create an +InboundEmail+ using the same arguments as +create_inbound_email_from_source+ and immediately route it
# to processing.
def receive_inbound_email_from_source(*args)
create_inbound_email_from_source(*args).tap(&:route)
end
end
end