File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 55use App \Exceptions \CannotLikeThreadMultipleTimes ;
66use App \Models \Thread ;
77use App \User ;
8- use Illuminate \Database \QueryException ;
98
109class LikeThread
1110{
Original file line number Diff line number Diff line change @@ -181,12 +181,12 @@ public function users_can_like_a_thread()
181181
182182 $ this ->loginAs ($ user );
183183 $ this ->put ("/forum/ {$ thread ->slug }/like " )
184- ->assertRedirectedTo (" /forum/the-first-thread " );
184+ ->assertRedirectedTo (' /forum/the-first-thread ' );
185185
186186 $ this ->seeInDatabase ('likes ' , [
187187 'user_id ' => $ user ->id ,
188188 'likeable_id ' => $ thread ->id ,
189- 'likeable_type ' => 'threads '
189+ 'likeable_type ' => 'threads ' ,
190190 ]);
191191 }
192192
@@ -199,12 +199,12 @@ public function users_can_unlike_a_thread()
199199
200200 $ this ->loginAs ($ user );
201201 $ this ->delete ("/forum/ {$ thread ->slug }/unlike " )
202- ->assertRedirectedTo (" /forum/the-first-thread " );
202+ ->assertRedirectedTo (' /forum/the-first-thread ' );
203203
204204 $ this ->notSeeInDatabase ('likes ' , [
205205 'user_id ' => $ user ->id ,
206206 'likeable_id ' => $ thread ->id ,
207- 'likeable_type ' => 'threads '
207+ 'likeable_type ' => 'threads ' ,
208208 ]);
209209 }
210210}
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ public function users_can_like_a_reply()
133133 $ this ->seeInDatabase ('likes ' , [
134134 'user_id ' => $ user ->id ,
135135 'likeable_id ' => $ reply ->id ,
136- 'likeable_type ' => 'replies '
136+ 'likeable_type ' => 'replies ' ,
137137 ]);
138138 }
139139
@@ -153,7 +153,7 @@ public function users_can_unlike_a_reply()
153153 $ this ->notSeeInDatabase ('likes ' , [
154154 'user_id ' => $ user ->id ,
155155 'likeable_id ' => $ reply ->id ,
156- 'likeable_type ' => 'replies '
156+ 'likeable_type ' => 'replies ' ,
157157 ]);
158158 }
159159}
You can’t perform that action at this time.
0 commit comments