@@ -73,7 +73,7 @@ public function it_approves_a_story_by_id()
7373
7474 Post::approve ($ post ->id );
7575
76- $ this ->seeInDatabase ('posts ' ,
76+ $ this ->assertDatabaseHas ('posts ' ,
7777 ['id ' => $ post ->id , $ this ->status_column => Status::APPROVED , $ this ->moderated_at_column => \Carbon \Carbon::now ()]);
7878 }
7979
@@ -84,7 +84,7 @@ public function it_rejects_a_story_by_id()
8484
8585 Post::reject ($ post ->id );
8686
87- $ this ->seeInDatabase ('posts ' ,
87+ $ this ->assertDatabaseHas ('posts ' ,
8888 ['id ' => $ post ->id , $ this ->status_column => Status::REJECTED , $ this ->moderated_at_column => \Carbon \Carbon::now ()]);
8989 }
9090
@@ -95,7 +95,7 @@ public function it_postpones_a_story_by_id()
9595
9696 Post::postpone ($ post ->id );
9797
98- $ this ->seeInDatabase ('posts ' ,
98+ $ this ->assertDatabaseHas ('posts ' ,
9999 ['id ' => $ post ->id , $ this ->status_column => Status::POSTPONED , $ this ->moderated_at_column => \Carbon \Carbon::now ()]);
100100 }
101101
@@ -106,7 +106,7 @@ public function it_pendings_a_story_by_id()
106106
107107 Post::pend ($ post ->id );
108108
109- $ this ->seeInDatabase ('posts ' ,
109+ $ this ->assertDatabaseHas ('posts ' ,
110110 ['id ' => $ post ->id , $ this ->status_column => Status::PENDING , $ this ->moderated_at_column => \Carbon \Carbon::now ()]);
111111 }
112112
@@ -178,7 +178,7 @@ public function it_deletes_rejected_resources(){
178178 $ postDel = Post::withRejected ()->where ('id ' , $ post ->id )->first ();
179179 $ postDel ->delete ();
180180
181- $ this ->dontSeeInDatabase ('posts ' ,['id ' => $ post ->id ]);
181+ $ this ->assertDatabaseMissing ('posts ' ,['id ' => $ post ->id ]);
182182 }
183183
184184 /** @test */
@@ -192,9 +192,9 @@ public function it_deletes_resources_of_any_status(){
192192 $ post ->delete ();
193193 }
194194
195- $ this ->dontSeeInDatabase ('posts ' ,['id ' => $ posts [0 ]->id ]);
196- $ this ->dontSeeInDatabase ('posts ' ,['id ' => $ posts [1 ]->id ]);
197- $ this ->dontSeeInDatabase ('posts ' ,['id ' => $ posts [2 ]->id ]);
195+ $ this ->assertDatabaseMissing ('posts ' ,['id ' => $ posts [0 ]->id ]);
196+ $ this ->assertDatabaseMissing ('posts ' ,['id ' => $ posts [1 ]->id ]);
197+ $ this ->assertDatabaseMissing ('posts ' ,['id ' => $ posts [2 ]->id ]);
198198 }
199199
200200 /** @test */
@@ -206,7 +206,7 @@ public function it_marks_as_approved_an_instance()
206206
207207 $ this ->assertEquals (Status::APPROVED , $ post ->status );
208208
209- $ this ->seeInDatabase ('posts ' ,
209+ $ this ->assertDatabaseHas ('posts ' ,
210210 ['id ' => $ post ->id , $ this ->status_column => Status::APPROVED , $ this ->moderated_at_column => \Carbon \Carbon::now ()]);
211211 }
212212
@@ -219,7 +219,7 @@ public function it_marks_as_rejected_an_instance()
219219
220220 $ this ->assertEquals (Status::REJECTED , $ post ->status );
221221
222- $ this ->seeInDatabase ('posts ' ,
222+ $ this ->assertDatabaseHas ('posts ' ,
223223 ['id ' => $ post ->id , $ this ->status_column => Status::REJECTED , $ this ->moderated_at_column => \Carbon \Carbon::now ()]);
224224 }
225225
@@ -232,7 +232,7 @@ public function it_marks_as_postponed_an_instance()
232232
233233 $ this ->assertEquals (Status::POSTPONED , $ post ->status );
234234
235- $ this ->seeInDatabase ('posts ' ,
235+ $ this ->assertDatabaseHas ('posts ' ,
236236 ['id ' => $ post ->id , $ this ->status_column => Status::POSTPONED , $ this ->moderated_at_column => \Carbon \Carbon::now ()]);
237237 }
238238
@@ -245,7 +245,7 @@ public function it_marks_as_pending_an_instance()
245245
246246 $ this ->assertEquals (Status::PENDING , $ post ->status );
247247
248- $ this ->seeInDatabase ('posts ' ,
248+ $ this ->assertDatabaseHas ('posts ' ,
249249 ['id ' => $ post ->id , $ this ->status_column => Status::PENDING , $ this ->moderated_at_column => \Carbon \Carbon::now ()]);
250250 }
251251
0 commit comments