Fix tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
681737bf36
commit
5e6bdb92fb
|
@ -71,7 +71,7 @@
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<%= render @view_module, @view_template, assigns %>
|
<%= @inner_content %>
|
||||||
<% if Mobilizon.Config.instance_demo_mode?() do %>
|
<% if Mobilizon.Config.instance_demo_mode?() do %>
|
||||||
<!-- BETA WARNING -->
|
<!-- BETA WARNING -->
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<%= render @view_module, @view_template, assigns %>
|
<%= @inner_content %>
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
|
@ -508,7 +508,7 @@ defmodule Mobilizon.GraphQL.Resolvers.ParticipantTest do
|
||||||
actorId: actor.id,
|
actorId: actor.id,
|
||||||
roles: "participant,moderator,administrator,creator",
|
roles: "participant,moderator,administrator,creator",
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 1
|
limit: 2
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -516,11 +516,7 @@ defmodule Mobilizon.GraphQL.Resolvers.ParticipantTest do
|
||||||
|
|
||||||
sorted_participants =
|
sorted_participants =
|
||||||
res["data"]["event"]["participants"]["elements"]
|
res["data"]["event"]["participants"]["elements"]
|
||||||
|> Enum.sort_by(
|
|> Enum.filter(&(&1["role"] == "CREATOR"))
|
||||||
&(&1
|
|
||||||
|> Map.get("actor")
|
|
||||||
|> Map.get("preferredUsername"))
|
|
||||||
)
|
|
||||||
|
|
||||||
assert sorted_participants == [
|
assert sorted_participants == [
|
||||||
%{
|
%{
|
||||||
|
@ -540,8 +536,8 @@ defmodule Mobilizon.GraphQL.Resolvers.ParticipantTest do
|
||||||
uuid: event.uuid,
|
uuid: event.uuid,
|
||||||
actorId: actor.id,
|
actorId: actor.id,
|
||||||
roles: "participant,moderator,administrator,creator",
|
roles: "participant,moderator,administrator,creator",
|
||||||
page: 2,
|
page: 1,
|
||||||
limit: 1
|
limit: 2
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1321,7 +1317,7 @@ defmodule Mobilizon.GraphQL.Resolvers.ParticipantTest do
|
||||||
|> hd
|
|> hd
|
||||||
|
|
||||||
update_participation_mutation = """
|
update_participation_mutation = """
|
||||||
mutation UpdateParticipation($participantId: ID!, $role: String!, $moderatorActorId: ID!) {
|
mutation UpdateParticipation($participantId: ID!, $role: ParticipantRoleEnum!, $moderatorActorId: ID!) {
|
||||||
updateParticipation(id: $participantId, role: $role, moderatorActorId: $moderatorActorId) {
|
updateParticipation(id: $participantId, role: $role, moderatorActorId: $moderatorActorId) {
|
||||||
id,
|
id,
|
||||||
role,
|
role,
|
||||||
|
|
|
@ -3,7 +3,6 @@ defmodule Mobilizon.GraphQL.AbsintheHelpers do
|
||||||
Absinthe helpers for tests
|
Absinthe helpers for tests
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import Plug.Conn
|
|
||||||
import Phoenix.ConnTest
|
import Phoenix.ConnTest
|
||||||
|
|
||||||
alias Plug.Conn
|
alias Plug.Conn
|
||||||
|
|
Loading…
Reference in a new issue