DEV: Better topic participants summary spec

This commit is contained in:
Penar Musaraj 2019-11-18 09:43:14 -05:00
parent a3df065058
commit 0e759add0f
1 changed files with 2 additions and 1 deletions

View File

@ -20,9 +20,10 @@ describe TopicParticipantsSummary do
fab!(:user3) { Fabricate(:user) } fab!(:user3) { Fabricate(:user) }
fab!(:user4) { Fabricate(:user) } fab!(:user4) { Fabricate(:user) }
fab!(:user5) { Fabricate(:user) } fab!(:user5) { Fabricate(:user) }
fab!(:user6) { Fabricate(:user) }
it "must never contains the user and at most 5 participants" do it "must never contains the user and at most 5 participants" do
topic.allowed_user_ids = [user1.id, user2.id, user3.id, user4.id, user5.id] topic.allowed_user_ids = [user1.id, user2.id, user3.id, user4.id, user5.id, user6.id]
expect(summary.map(&:user)).to eq([user1, user2, user3, user4, user5]) expect(summary.map(&:user)).to eq([user1, user2, user3, user4, user5])
end end