Laravel - HTTP Tests - Verifying Json Paths

If you would like to verify that the JSON response contains the given data at a specified path, you should use the assertJsonPath method:

    
    json('POST', '/user', ['name' => 'Sally']);
    
            $response
                ->assertStatus(201)
                ->assertJsonPath('team.owner.name', 'Darian');
        }
    }