FIX: Fix flaky test resulting from PostAlerter keyword arguments (#19826)
We've been doing some work to support new keyword argument semantics in Ruby 3. As part of that we made some changes to `DiscourseEvent::TestHelper`. The backwards compatibility fix doesn't work if the method is called with an empty hash as the final argument. This fix adds a valid option to the final hash in the particular test.
This commit is contained in:
parent
98d5a0e63c
commit
421fbfd1c7
|
@ -1053,10 +1053,12 @@ RSpec.describe PostAlerter do
|
|||
it "triggers :before_create_notification" do
|
||||
type = Notification.types[:private_message]
|
||||
events =
|
||||
DiscourseEvent.track_events { PostAlerter.new.create_notification(user, type, post, {}) }
|
||||
DiscourseEvent.track_events do
|
||||
PostAlerter.new.create_notification(user, type, post, { revision_number: 1 })
|
||||
end
|
||||
expect(events).to include(
|
||||
event_name: :before_create_notification,
|
||||
params: [user, type, post, {}],
|
||||
params: [user, type, post, { revision_number: 1 }],
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue