FEATURE: provide more details when performing a bulk add to group

This commit is contained in:
Arpit Jalan
2017-04-27 00:30:05 +05:30
parent f499180bb3
commit 285c167fae
7 changed files with 38 additions and 5 deletions

View File

@ -69,6 +69,11 @@ describe Admin::GroupsController do
expect(user2.primary_group).to eq(group)
expect(user2.title).to eq("WAT")
expect(user2.trust_level).to eq(4)
# verify JSON response
json = ::JSON.parse(response.body)
expect(json['message']).to eq("2 users have been added to the group.")
expect(json['users_not_added'][0]).to eq("doesnt_exist")
end
end