From 60894d63512e5284e7a11075ab78932045c85933 Mon Sep 17 00:00:00 2001 From: Laurence Date: Tue, 2 Oct 2018 09:56:09 +0000 Subject: [PATCH] fix auth --- .../Testing/Concerns/InteractsWithAuthentication.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php b/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php index a5f05a5e9b0a..faa7879e4f48 100644 --- a/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php +++ b/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php @@ -29,6 +29,10 @@ public function actingAs(UserContract $user, $driver = null) */ public function be(UserContract $user, $driver = null) { + if (isset($user->wasRecentlyCreated) && $user->wasRecentlyCreated) { + $user->wasRecentlyCreated = false; + } + $this->app['auth']->guard($driver)->setUser($user); $this->app['auth']->shouldUse($driver);