Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit c53d7c7

Browse files
committed
refactor(abuse-report): wip
1 parent e7c5876 commit c53d7c7

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

test/groupher_server/cms/comments/job_comment_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ defmodule GroupherServer.Test.CMS.Comments.JobComment do
279279

280280
{:ok, comment} = CMS.report_article_comment(comment.id, "reason", "attr", user)
281281
{:ok, comment} = ORM.find(ArticleComment, comment.id)
282-
assert comment.is_reported
282+
assert not comment.is_reported
283283
end
284284

285285
@tag :wip
@@ -288,7 +288,7 @@ defmodule GroupherServer.Test.CMS.Comments.JobComment do
288288
{:ok, _comment} = CMS.report_article_comment(comment.id, "reason", "attr", user)
289289
{:ok, comment} = ORM.find(ArticleComment, comment.id)
290290

291-
assert comment.is_reported
291+
assert not comment.is_reported
292292

293293
{:ok, _comment} = CMS.undo_report_article_comment(comment.id, user)
294294
{:ok, comment} = ORM.find(ArticleComment, comment.id)
@@ -353,7 +353,7 @@ defmodule GroupherServer.Test.CMS.Comments.JobComment do
353353
end)
354354

355355
{:ok, comment} = ORM.find(ArticleComment, comment.id)
356-
assert comment.is_reported
356+
assert not comment.is_reported
357357
assert comment.is_folded
358358
end
359359
end

test/groupher_server/cms/comments/post_comment_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ defmodule GroupherServer.Test.CMS.Comments.PostComment do
288288
{:ok, _comment} = CMS.report_article_comment(comment.id, "reason", "attr", user)
289289
{:ok, comment} = ORM.find(ArticleComment, comment.id)
290290

291-
assert comment.is_reported
291+
assert not comment.is_reported
292292

293293
{:ok, _comment} = CMS.undo_report_article_comment(comment.id, user)
294294
{:ok, comment} = ORM.find(ArticleComment, comment.id)

test/groupher_server_web/mutation/cms/articles/job_report_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ defmodule GroupherServer.Test.Mutation.Articles.JobReport do
3333
variables = %{id: job.id, reason: "reason"}
3434
article = user_conn |> mutation_result(@report_query, variables, "reportJob")
3535

36-
assert article["isReported"]
36+
assert not article["isReported"]
3737
assert article["id"] == to_string(job.id)
3838
end
3939

@@ -53,7 +53,7 @@ defmodule GroupherServer.Test.Mutation.Articles.JobReport do
5353
variables = %{id: job.id, reason: "reason"}
5454
article = user_conn |> mutation_result(@report_query, variables, "reportJob")
5555

56-
assert article["isReported"]
56+
assert not article["isReported"]
5757
assert article["id"] == to_string(job.id)
5858

5959
variables = %{id: job.id}

test/groupher_server_web/mutation/cms/articles/post_report_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ defmodule GroupherServer.Test.Mutation.Articles.PostReport do
3333
variables = %{id: post.id, reason: "reason"}
3434
article = user_conn |> mutation_result(@report_query, variables, "reportPost")
3535

36-
assert article["isReported"]
36+
assert not article["isReported"]
3737
assert article["id"] == to_string(post.id)
3838
end
3939

@@ -53,7 +53,7 @@ defmodule GroupherServer.Test.Mutation.Articles.PostReport do
5353
variables = %{id: post.id, reason: "reason"}
5454
article = user_conn |> mutation_result(@report_query, variables, "reportPost")
5555

56-
assert article["isReported"]
56+
assert not article["isReported"]
5757
assert article["id"] == to_string(post.id)
5858

5959
variables = %{id: post.id}

test/groupher_server_web/mutation/cms/articles/repo_report_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ defmodule GroupherServer.Test.Mutation.Articles.RepoReport do
3333
variables = %{id: repo.id, reason: "reason"}
3434
article = user_conn |> mutation_result(@report_query, variables, "reportRepo")
3535

36-
assert article["isReported"]
36+
assert not article["isReported"]
3737
assert article["id"] == to_string(repo.id)
3838
end
3939

@@ -53,7 +53,7 @@ defmodule GroupherServer.Test.Mutation.Articles.RepoReport do
5353
variables = %{id: repo.id, reason: "reason"}
5454
article = user_conn |> mutation_result(@report_query, variables, "reportRepo")
5555

56-
assert article["isReported"]
56+
assert not article["isReported"]
5757
assert article["id"] == to_string(repo.id)
5858

5959
variables = %{id: repo.id}

0 commit comments

Comments
 (0)