@@ -27,8 +27,7 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyBlog do
2727 { :ok , article } = CMS . upvote_article ( :blog , blog . id , user2 )
2828 Hooks.Notify . handle ( :upvote , article , user2 )
2929
30- { :ok , notifications } =
31- Delivery . fetch ( :notification , blog . author . user . id , % { page: 1 , size: 20 } )
30+ { :ok , notifications } = Delivery . fetch ( :notification , blog . author . user , % { page: 1 , size: 20 } )
3231
3332 assert notifications . total_count == 1
3433
@@ -46,8 +45,7 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyBlog do
4645
4746 Hooks.Notify . handle ( :upvote , comment , user2 )
4847
49- { :ok , notifications } =
50- Delivery . fetch ( :notification , comment . author . id , % { page: 1 , size: 20 } )
48+ { :ok , notifications } = Delivery . fetch ( :notification , comment . author , % { page: 1 , size: 20 } )
5149
5250 assert notifications . total_count == 1
5351
@@ -69,8 +67,7 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyBlog do
6967 { :ok , article } = CMS . undo_upvote_article ( :blog , blog . id , user2 )
7068 Hooks.Notify . handle ( :undo , :upvote , article , user2 )
7169
72- { :ok , notifications } =
73- Delivery . fetch ( :notification , blog . author . user . id , % { page: 1 , size: 20 } )
70+ { :ok , notifications } = Delivery . fetch ( :notification , blog . author . user , % { page: 1 , size: 20 } )
7471
7572 assert notifications . total_count == 0
7673 end
@@ -85,8 +82,7 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyBlog do
8582
8683 { :ok , comment } = preload_author ( comment )
8784
88- { :ok , notifications } =
89- Delivery . fetch ( :notification , comment . author . id , % { page: 1 , size: 20 } )
85+ { :ok , notifications } = Delivery . fetch ( :notification , comment . author , % { page: 1 , size: 20 } )
9086
9187 assert notifications . total_count == 0
9288 end
@@ -99,8 +95,7 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyBlog do
9995 { :ok , _ } = CMS . collect_article ( :blog , blog . id , user2 )
10096 Hooks.Notify . handle ( :collect , blog , user2 )
10197
102- { :ok , notifications } =
103- Delivery . fetch ( :notification , blog . author . user . id , % { page: 1 , size: 20 } )
98+ { :ok , notifications } = Delivery . fetch ( :notification , blog . author . user , % { page: 1 , size: 20 } )
10499
105100 assert notifications . total_count == 1
106101
@@ -121,8 +116,7 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyBlog do
121116 { :ok , _ } = CMS . undo_upvote_article ( :blog , blog . id , user2 )
122117 Hooks.Notify . handle ( :undo , :collect , blog , user2 )
123118
124- { :ok , notifications } =
125- Delivery . fetch ( :notification , blog . author . user . id , % { page: 1 , size: 20 } )
119+ { :ok , notifications } = Delivery . fetch ( :notification , blog . author . user , % { page: 1 , size: 20 } )
126120
127121 assert notifications . total_count == 0
128122 end
@@ -135,8 +129,7 @@ defmodule GroupherServer.Test.CMS.Hooks.NotifyBlog do
135129 { :ok , comment } = CMS . create_comment ( :blog , blog . id , mock_comment ( ) , user2 )
136130 Hooks.Notify . handle ( :comment , comment , user2 )
137131
138- { :ok , notifications } =
139- Delivery . fetch ( :notification , blog . author . user . id , % { page: 1 , size: 20 } )
132+ { :ok , notifications } = Delivery . fetch ( :notification , blog . author . user , % { page: 1 , size: 20 } )
140133
141134 assert notifications . total_count == 1
142135
0 commit comments