Fix tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-06-03 15:33:50 +02:00
parent 681737bf36
commit 5e6bdb92fb
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
4 changed files with 7 additions and 12 deletions

View file

@ -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>

View file

@ -1,4 +1,4 @@
<%= render @view_module, @view_template, assigns %>
<%= @inner_content %>
--

View file

@ -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,

View file

@ -3,7 +3,6 @@ defmodule Mobilizon.GraphQL.AbsintheHelpers do
Absinthe helpers for tests
"""
import Plug.Conn
import Phoenix.ConnTest
alias Plug.Conn