Various refactoring and typespec improvements
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -126,7 +126,7 @@ defmodule Mobilizon.GraphQL.API.ReportTest do
|
||||
|
||||
%Comment{id: comment_1_id} = _comment_1 = insert(:comment, actor: reported)
|
||||
|
||||
assert {:ok, %Activity{} = flag_activity, %Report{id: report_id} = _report} =
|
||||
assert {:ok, %Activity{}, %Report{id: report_id} = _report} =
|
||||
Reports.report(%{
|
||||
reporter_id: reporter_id,
|
||||
reported_id: reported_id,
|
||||
@@ -152,7 +152,7 @@ defmodule Mobilizon.GraphQL.API.ReportTest do
|
||||
|
||||
%Comment{id: comment_1_id} = _comment_1 = insert(:comment, actor: reported)
|
||||
|
||||
assert {:ok, %Activity{} = flag_activity, %Report{id: report_id} = _report} =
|
||||
assert {:ok, %Activity{}, %Report{id: report_id} = _report} =
|
||||
Reports.report(%{
|
||||
reporter_id: reporter_id,
|
||||
reported_id: reported_id,
|
||||
|
||||
@@ -34,7 +34,6 @@ defmodule Mobilizon.GraphQL.Resolvers.CommentTest do
|
||||
|
||||
test "create_comment/3 creates a comment", %{
|
||||
conn: conn,
|
||||
actor: actor,
|
||||
user: user,
|
||||
event: event
|
||||
} do
|
||||
@@ -51,7 +50,6 @@ defmodule Mobilizon.GraphQL.Resolvers.CommentTest do
|
||||
|
||||
test "create_comment/3 doesn't allow creating events if it's disabled", %{
|
||||
conn: conn,
|
||||
actor: actor,
|
||||
user: user,
|
||||
event: event
|
||||
} do
|
||||
@@ -93,8 +91,6 @@ defmodule Mobilizon.GraphQL.Resolvers.CommentTest do
|
||||
conn: conn,
|
||||
event: event
|
||||
} do
|
||||
actor = insert(:actor)
|
||||
|
||||
res =
|
||||
conn
|
||||
|> AbsintheHelpers.graphql_query(
|
||||
@@ -108,7 +104,6 @@ defmodule Mobilizon.GraphQL.Resolvers.CommentTest do
|
||||
|
||||
test "create_comment/3 creates a reply to a comment", %{
|
||||
conn: conn,
|
||||
actor: actor,
|
||||
user: user,
|
||||
event: event
|
||||
} do
|
||||
|
||||
@@ -150,7 +150,7 @@ defmodule Mobilizon.GraphQL.Resolvers.MediaTest do
|
||||
variables: %{id: media_id}
|
||||
)
|
||||
|
||||
assert is_nil(res["errors"])
|
||||
assert res["errors"] == nil
|
||||
assert res["data"]["removeMedia"]["id"] == to_string(media_id)
|
||||
|
||||
res =
|
||||
|
||||
Reference in New Issue
Block a user