correct erratic spec

This commit is contained in:
Sam 2017-09-29 12:58:15 +10:00
parent f6fdc1ebe8
commit 0358931b9f
1 changed files with 3 additions and 1 deletions

View File

@ -50,7 +50,9 @@ RSpec.describe Jobs::PublishTopicToCategory do
message = MessageBus.track_publish do
described_class.new.execute(topic_timer_id: topic.public_topic_timer.id)
end.first
end.find do |m|
Hash === m.data && m.data.key?(:reload_topic)
end
topic.reload
expect(topic.category).to eq(another_category)