11defmodule GroupherServer.Test.CMS.ContentFlags do
2+ @ moduledoc false
3+
24 use GroupherServer.TestTools
35
46 alias GroupherServer.CMS
57
68 alias CMS . {
7- Post ,
89 PostCommunityFlag ,
9- Repo ,
1010 RepoCommunityFlag ,
11- Job ,
1211 JobCommunityFlag ,
13- Video ,
1412 VideoCommunityFlag
1513 }
1614
@@ -35,7 +33,7 @@ defmodule GroupherServer.Test.CMS.ContentFlags do
3533 { :ok , found } = PostCommunityFlag |> ORM . find_by ( ~m( post_id community_id) a )
3634 assert found . trash == false
3735
38- CMS . set_community_flags ( % Post { id: post . id } , community . id , % { trash: true } )
36+ CMS . set_community_flags ( community , post , % { trash: true } )
3937
4038 { :ok , found } = PostCommunityFlag |> ORM . find_by ( ~m( post_id community_id) a )
4139
@@ -55,7 +53,7 @@ defmodule GroupherServer.Test.CMS.ContentFlags do
5553 { :ok , found } = JobCommunityFlag |> ORM . find_by ( ~m( job_id community_id) a )
5654 assert found . trash == false
5755
58- CMS . set_community_flags ( % Job { id: job . id } , community . id , % { trash: true } )
56+ CMS . set_community_flags ( community , job , % { trash: true } )
5957
6058 { :ok , found } = JobCommunityFlag |> ORM . find_by ( ~m( job_id community_id) a )
6159
@@ -73,7 +71,7 @@ defmodule GroupherServer.Test.CMS.ContentFlags do
7371 { :ok , found } = VideoCommunityFlag |> ORM . find_by ( ~m( video_id community_id) a )
7472 assert found . trash == false
7573
76- CMS . set_community_flags ( % Video { id: video . id } , community . id , % { trash: true } )
74+ CMS . set_community_flags ( community , video , % { trash: true } )
7775
7876 { :ok , found } = VideoCommunityFlag |> ORM . find_by ( ~m( video_id community_id) a )
7977
@@ -91,7 +89,7 @@ defmodule GroupherServer.Test.CMS.ContentFlags do
9189 { :ok , found } = RepoCommunityFlag |> ORM . find_by ( ~m( repo_id community_id) a )
9290 assert found . trash == false
9391
94- CMS . set_community_flags ( % Repo { id: repo . id } , community . id , % { trash: true } )
92+ CMS . set_community_flags ( community , repo , % { trash: true } )
9593
9694 { :ok , found } = RepoCommunityFlag |> ORM . find_by ( ~m( repo_id community_id) a )
9795
0 commit comments