@@ -64,7 +64,7 @@ public function test(): void
64
64
->includePaths ('author ' , 'tags ' )
65
65
->patch (url ('/api/v1/posts ' , $ this ->post ));
66
66
67
- $ response ->assertUpdated ($ expected );
67
+ $ response ->assertFetchedOne ($ expected );
68
68
69
69
$ this ->assertDatabaseHas ('posts ' , [
70
70
'author_id ' => $ this ->post ->author ->getKey (),
@@ -120,7 +120,7 @@ public function testIndividualField(string $fieldName): void
120
120
->withData ($ data )
121
121
->patch (url ('/api/v1/posts ' , $ this ->post ));
122
122
123
- $ response ->assertUpdated ($ expected-> jsonSerialize () );
123
+ $ response ->assertFetchedOne ($ expected );
124
124
125
125
$ this ->assertDatabaseHas ('posts ' , [
126
126
'author_id ' => $ this ->post ->author ->getKey (),
@@ -159,7 +159,7 @@ public function testSoftDelete(): void
159
159
->withData ($ data )
160
160
->patch (url ('/api/v1/posts ' , $ this ->post ));
161
161
162
- $ response ->assertUpdated ($ expected-> jsonSerialize () );
162
+ $ response ->assertFetchedOne ($ expected );
163
163
164
164
$ this ->assertSoftDeleted ($ this ->post );
165
165
$ this ->assertTrue ($ deleted );
@@ -191,7 +191,7 @@ public function testRestore(): void
191
191
->withData ($ data )
192
192
->patch (url ('/api/v1/posts ' , $ this ->post ));
193
193
194
- $ response ->assertUpdated ($ expected-> jsonSerialize () );
194
+ $ response ->assertFetchedOne ($ expected );
195
195
196
196
$ this ->assertDatabaseHas ('posts ' , array_merge ($ this ->post ->getOriginal (), [
197
197
'deleted_at ' => null ,
0 commit comments