@@ -35,12 +35,12 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyPost do
3535 notify = notifications . entries |> List . first ( )
3636 assert notify . action == "UPVOTE"
3737 assert notify . article_id == post . id
38- assert notify . type == "POST"
38+ assert notify . thread == "POST"
3939 assert notify . user_id == post . author . user . id
4040 assert user_exist_in? ( user2 , notify . from_users )
4141 end
4242
43- @ tag :wip
43+ @ tag :wip2
4444 test "upvote hook should work on post comment" , ~m( user2 post comment) a do
4545 { :ok , comment } = CMS . upvote_comment ( comment . id , user2 )
4646 { :ok , comment } = preload_author ( comment )
@@ -55,7 +55,7 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyPost do
5555 notify = notifications . entries |> List . first ( )
5656 assert notify . action == "UPVOTE"
5757 assert notify . article_id == post . id
58- assert notify . type == "POST"
58+ assert notify . thread == "POST"
5959 assert notify . user_id == comment . author . id
6060 assert notify . comment_id == comment . id
6161 assert user_exist_in? ( user2 , notify . from_users )
@@ -111,7 +111,7 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyPost do
111111 notify = notifications . entries |> List . first ( )
112112 assert notify . action == "COLLECT"
113113 assert notify . article_id == post . id
114- assert notify . type == "POST"
114+ assert notify . thread == "POST"
115115 assert notify . user_id == post . author . user . id
116116 assert user_exist_in? ( user2 , notify . from_users )
117117 end
@@ -148,12 +148,10 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyPost do
148148
149149 notify = notifications . entries |> List . first ( )
150150 assert notify . action == "COMMENT"
151- assert notify . type == "POST"
151+ assert notify . thread == "POST"
152152 assert notify . article_id == post . id
153153 assert notify . user_id == post . author . user . id
154154 assert user_exist_in? ( user2 , notify . from_users )
155-
156- IO . inspect ( notifications , label: "notifications" )
157155 end
158156 end
159157end
0 commit comments