File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
tests/dummy/tests/Api/V1/Users Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change 1616
1717class DeleteTest extends TestCase
1818{
19-
2019 public function test (): void
2120 {
2221 $ user = User::factory ()->createOne ();
2322
24- $ expected = $ this ->serializer
25- ->user ($ user );
2623 $ response = $ this
2724 ->actingAs (User::factory ()->createOne ())
2825 ->jsonApi ('users ' )
29- ->delete (url ('/api/v1/users ' , $ expected [ ' id ' ] ));
26+ ->delete (url ('/api/v1/users ' , $ user ));
3027
31- $ response ->assertNotFound ()
32- ->assertHasError (404 , [
28+ $ response ->assertNotFound ()->assertErrorStatus ([
3329 'detail ' => 'not found message ' ,
3430 'status ' => '404 ' ,
3531 'title ' => 'Not Found ' ,
@@ -40,14 +36,11 @@ public function testUnauthenticated(): void
4036 {
4137 $ user = User::factory ()->createOne ();
4238
43- $ expected = $ this ->serializer
44- ->user ($ user );
4539 $ response = $ this
4640 ->jsonApi ('users ' )
47- ->delete (url ('/api/v1/users ' , $ expected [ ' id ' ] ));
41+ ->delete (url ('/api/v1/users ' , $ user ));
4842
49- $ response ->assertNotFound ()
50- ->assertHasError (404 , [
43+ $ response ->assertNotFound ()->assertErrorStatus ([
5144 'detail ' => 'not found message ' ,
5245 'status ' => '404 ' ,
5346 'title ' => 'Not Found ' ,
You can’t perform that action at this time.
0 commit comments