Apr 5, 2017
0
Level 2
HTTP Integration Test: Following Redirect
I'm trying to write some start to finish integration tests four our oauth application. APP is using laravel 5.4 and Passport.
I'm able to make the initial call to oauth/authorize and I get back a Redirect to /login.
From their I can't figure out how to tell the system to go ahead and follow the redirect.
My code currently is a standard Laravel TestCase. ''' $params = [ "client_id" => $this->client->id, "redirect_uri" => $this->client->redirect, "response_type" => "token" ];
$url = env('APP_URL') . "/oauth/authorize?" . http_build_query($params);
$resp = $this->get($url); $resp->assertRedirect("/login"); '''
Please or to participate in this conversation.