Skip to content

Commit

Permalink
Fixes error in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
chyke007 committed Jan 5, 2021
1 parent cc3b4d6 commit a5b052d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/Feature/LoginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,12 @@ public function testValidLogin()
$response
->assertStatus(200)
;

$response = $this->withHeaders([
'Accept' => 'application/json',
])->json('POST', '/api/login',
['email' => 'Sally2@test.com', 'password'=> 'credpal']);
var_dump($response->json());
$data = $response->json()['data'];
$this->assertEquals($data['user']['email'], 'Sally2@test.com');
])->json('POST', '/api/login',
['email' => 'Sally2@test.com', 'password'=> 'credpal']);
$this->assertEquals($response->json()['data']['user']['email'], 'Sally2@test.com');
}

/**Invalid email credential.
Expand Down

0 comments on commit a5b052d

Please sign in to comment.