X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c429cf78187e80deb63982a282a1c6889f30291a..refs/pull/2902/head:/tests/Auth/Saml2Test.php diff --git a/tests/Auth/Saml2Test.php b/tests/Auth/Saml2Test.php index 096f862e7..8ace3e2ee 100644 --- a/tests/Auth/Saml2Test.php +++ b/tests/Auth/Saml2Test.php @@ -289,16 +289,18 @@ class Saml2Test extends TestCase $this->assertEquals('http://localhost/register/confirm', url()->current()); $acsPost->assertSee('Please check your email and click the confirmation button to access BookStack.'); + /** @var User $user */ $user = User::query()->where('external_auth_id', '=', 'user')->first(); $userRoleIds = $user->roles()->pluck('id'); $this->assertContains($memberRole->id, $userRoleIds, 'User was assigned to member role'); $this->assertContains($adminRole->id, $userRoleIds, 'User was assigned to admin role'); - $this->assertTrue($user->email_confirmed == false, 'User email remains unconfirmed'); + $this->assertFalse(boolval($user->email_confirmed), 'User email remains unconfirmed'); }); + $this->assertNull(auth()->user()); $homeGet = $this->get('/'); - $homeGet->assertRedirect('/register/confirm/awaiting'); + $homeGet->assertRedirect('/login'); } public function test_login_where_existing_non_saml_user_shows_warning()