From dcab0a9cb4d5c77f22cd750cfab8dbacab4818ae Mon Sep 17 00:00:00 2001 From: Guillaume Briday Date: Wed, 17 Oct 2018 00:39:49 +0200 Subject: [PATCH] Fixing test because a model should not be act as recently created --- tests/Feature/V1/Auth/AuthTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/Feature/V1/Auth/AuthTest.php b/tests/Feature/V1/Auth/AuthTest.php index 8d0daef..9eb3444 100644 --- a/tests/Feature/V1/Auth/AuthTest.php +++ b/tests/Feature/V1/Auth/AuthTest.php @@ -49,9 +49,12 @@ public function user_cannot_retrieve_a_jwt() /** @test */ public function user_can_be_authenticated_with_jwt() { - $this->actingAs($this->anakin()) + $anakin = $this->anakin(); + $anakin->wasRecentlyCreated = false; + + $this->actingAs($anakin) ->json('GET', '/api/v1/auth/me') - ->assertStatus(201) + ->assertStatus(200) ->assertJsonStructure([ 'data' => [ 'name',