Fix brittle spec.

This commit is contained in:
Guo Xiang Tan 2018-05-08 10:50:11 +08:00
parent 3a6e137e70
commit 086cb0f849
1 changed files with 1 additions and 1 deletions

View File

@ -685,7 +685,7 @@ describe Group do
it "should publish the group's categories to the client" do it "should publish the group's categories to the client" do
group.update!(public_admission: true, categories: [category]) group.update!(public_admission: true, categories: [category])
message = MessageBus.track_publish { group.add(user) }.first message = MessageBus.track_publish("/categories") { group.add(user) }.first
expect(message.data[:categories].count).to eq(1) expect(message.data[:categories].count).to eq(1)
expect(message.data[:categories].first[:id]).to eq(category.id) expect(message.data[:categories].first[:id]).to eq(category.id)