mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Improve MessageBus.track_publish to allow filter by channel.
This commit is contained in:
@@ -15,9 +15,8 @@ describe PostMerger do
|
||||
reply3 = create_post(topic: topic, raw: 'The third reply', post_number: 4, user: user)
|
||||
replies = [reply3, reply2, reply1]
|
||||
|
||||
message = MessageBus.track_publish { PostMerger.new(admin, replies).merge }.last
|
||||
message = MessageBus.track_publish("/topic/#{topic.id}") { PostMerger.new(admin, replies).merge }.last
|
||||
|
||||
expect(message.channel).to eq("/topic/#{topic.id}")
|
||||
expect(message.data[:type]).to eq(:revised)
|
||||
expect(message.data[:post_number]).to eq(reply3.post_number)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user