I have an api test that asserts for redirect to a specific route. The issue is the redirect url has query parameters that includes a timestamp which changes. Wondering if Laravel's assertions has an an alternative to assertRedirect method that ignores query parameters.
/** @test */
public function test_can_redirect()
{
$this->call('GET', "users/auth")
->assertRedirect('http://localhost:8000/dashboard?timestamp=1550848436');
}
I want to assert a redirect to
http://localhost:8000/dashboard
not
http://localhost:8000/dashboard?timestamp=1550848436
Aucun commentaire:
Enregistrer un commentaire