Fix false positive
I found out while trying to make another test fail. If the `new_memberships` array was empty (i.e none of the user memberships were found) it had nothing to iterate over, so it returned true. Hopefully, only one test seems to be affected by this.
This commit is contained in:
parent
60694e828c
commit
3c9444c47e
@ -201,6 +201,7 @@ describe Jobs::AutoJoinChannelBatch do
|
||||
|
||||
def assert_users_follows_channel(channel, users)
|
||||
new_memberships = UserChatChannelMembership.where(user: users, chat_channel: channel)
|
||||
expect(new_memberships.length).to eq(users.length)
|
||||
expect(new_memberships.all?(&:following)).to eq(true)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user