| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function testLoginWithInvalidCredentials() |
||
| 16 | { |
||
| 17 | //When we try to login passing wrong credentials |
||
| 18 | $payload = [ |
||
| 19 | 'login' => 'foo', |
||
| 20 | 'password' => 'bar', |
||
| 21 | ]; |
||
| 22 | |||
| 23 | $response = $this->json('POST', $this->authUri, $payload); |
||
| 24 | |||
| 25 | // It should return an error invalid_credentials |
||
| 26 | $response |
||
| 27 | ->assertStatus(401) |
||
| 28 | ->assertJson([ 'error' => 'invalid_credentials' ]); |
||
| 29 | } |
||
| 53 |