Fix randomly failing spec.

This commit is contained in:
Guo Xiang Tan 2018-01-03 14:42:16 +08:00
parent af1e2865f7
commit 647cf7545d
1 changed files with 3 additions and 1 deletions

View File

@ -278,7 +278,9 @@ RSpec.describe UsersController do
}
expect(response).to be_success
expect(JSON.parse(response.body)["groups"].last['name']).to eq(messageable_group.name)
expect(JSON.parse(response.body)["groups"].map { |group| group['name'] })
.to contain_exactly(messageable_group.name, Group.find(Group::AUTO_GROUPS[:moderators]).name)
end
it 'searches for mentionable groups' do