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