Fix tests failure with Group test find_group/3

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-11-27 14:56:48 +01:00
parent 662541c312
commit 74e59b2398
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -155,6 +155,7 @@ defmodule Mobilizon.Web.Resolvers.GroupTest do
group.preferred_username
assert res["data"]["group"]["members"]["total"] == 2
assert res["data"]["group"]["members"]["elements"] == []
res =
conn
@ -170,9 +171,12 @@ defmodule Mobilizon.Web.Resolvers.GroupTest do
assert res["errors"] == nil
assert res["data"]["group"]["members"]["total"] == 2
assert hd(res["data"]["group"]["members"]["elements"])["role"] == "ADMINISTRATOR"
assert hd(res["data"]["group"]["members"]["elements"])["actor"]["preferredUsername"] ==
admin =
res["data"]["group"]["members"]["elements"]
|> Enum.find(&(&1["role"] == "ADMINISTRATOR"))
assert admin["actor"]["preferredUsername"] ==
actor.preferred_username
res =