Fix specs.
This commit is contained in:
parent
c897e5599a
commit
28befcb5d4
|
@ -23,7 +23,7 @@ describe "Groups" do
|
|||
|
||||
group_ids = response_body["groups"].map { |g| g["id"] }
|
||||
|
||||
expect(response_body["groups"].map { |g| g['is_group_user'] }).to eq([nil])
|
||||
expect(response_body["extras"]["group_user_ids"]).to eq([])
|
||||
expect(group_ids).to include(other_group.id)
|
||||
expect(group_ids).to_not include(group.id)
|
||||
expect(response_body["load_more_groups"]).to eq("/groups?page=1")
|
||||
|
@ -32,7 +32,9 @@ describe "Groups" do
|
|||
|
||||
context 'viewing as an admin' do
|
||||
it 'should display automatic groups' do
|
||||
sign_in(Fabricate(:admin))
|
||||
admin = Fabricate(:admin)
|
||||
sign_in(admin)
|
||||
group.add(admin)
|
||||
|
||||
get "/groups.json"
|
||||
|
||||
|
@ -42,7 +44,7 @@ describe "Groups" do
|
|||
|
||||
group_ids = response_body["groups"].map { |g| g["id"] }
|
||||
|
||||
expect(response_body["groups"].first['is_group_user']).to eq(false)
|
||||
expect(response_body["extras"]["group_user_ids"]).to eq([group.id])
|
||||
expect(group_ids).to include(group.id, other_group.id)
|
||||
expect(response_body["load_more_groups"]).to eq("/groups?page=1")
|
||||
expect(response_body["total_rows_groups"]).to eq(10)
|
||||
|
|
Loading…
Reference in New Issue