Skip to content

Commit f111da3

Browse files
committed
creates a notification after calling message factory
1 parent e9b85de commit f111da3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/factories/better_together/messages.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@
77
content { Faker::Lorem.paragraph }
88
association :sender, factory: :person
99
association :conversation
10+
11+
after(:create) do |message|
12+
BetterTogether::NewMessageNotifier.with(record: message,
13+
conversation_id: message.conversation_id)
14+
.deliver(message.conversation.participants)
15+
end
1016
end
1117
end

0 commit comments

Comments
 (0)