mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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:
parent
e485c14a3e
commit
4a9f2a746e
1 changed files with 6 additions and 6 deletions
|
@ -29,16 +29,16 @@ module ActionMailbox
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue