mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Change the AS::Notification payload to include the mailbox instance
This commit is contained in:
parent
599e73bc00
commit
246c13f8df
2 changed files with 4 additions and 3 deletions
|
@ -108,7 +108,7 @@ module ActionMailbox
|
|||
private
|
||||
def instrumentation_payload
|
||||
{
|
||||
mailbox: self.class.name,
|
||||
mailbox: self,
|
||||
inbound_email: inbound_email.instrumentation_payload
|
||||
}
|
||||
end
|
||||
|
|
|
@ -12,13 +12,14 @@ class ActionMailbox::Base::NotificationsTest < ActiveSupport::TestCase
|
|||
events << ActiveSupport::Notifications::Event.new(*args)
|
||||
end
|
||||
|
||||
RepliesMailbox.receive create_inbound_email_from_fixture("welcome.eml")
|
||||
mailbox = RepliesMailbox.new(create_inbound_email_from_fixture("welcome.eml"))
|
||||
mailbox.perform_processing
|
||||
|
||||
assert_equal 1, events.length
|
||||
assert_equal "process.action_mailbox", events[0].name
|
||||
assert_equal(
|
||||
{
|
||||
mailbox: "RepliesMailbox",
|
||||
mailbox: mailbox,
|
||||
inbound_email: {
|
||||
id: 1,
|
||||
message_id: "0CB459E0-0336-41DA-BC88-E6E28C697DDB@37signals.com",
|
||||
|
|
Loading…
Reference in a new issue