From 27651ce00640900b5f0a91a9c11e72f09e2137f5 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sat, 19 Jun 2021 00:58:31 +0200 Subject: [PATCH] Add firstname and lastname --- resources/js/views/Login.vue | 1 - tests/Feature/LoginTest.php | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/js/views/Login.vue b/resources/js/views/Login.vue index 254481b6..e6b4a2f3 100644 --- a/resources/js/views/Login.vue +++ b/resources/js/views/Login.vue @@ -7,7 +7,6 @@
-
diff --git a/tests/Feature/LoginTest.php b/tests/Feature/LoginTest.php index 711074e5..794ee6e7 100644 --- a/tests/Feature/LoginTest.php +++ b/tests/Feature/LoginTest.php @@ -14,7 +14,7 @@ class LoginTest extends TestCase { $this->withoutExceptionHandling(); $this->fakeNamiMembers([ - [ 'gruppierungId' => 11222, 'vorname' => 'Max', 'id' => 123 ] + [ 'gruppierungId' => 11222, 'vorname' => 'Max', 'nachname' => 'Muster', 'id' => 123 ] ]); $this->fakeNamiPassword(123, 'secret', [11222]); @@ -27,8 +27,11 @@ class LoginTest extends TestCase $key = session()->get('auth_key'); $cache = Cache::get("namiauth-{$key}"); - $this->assertEquals('JSESSIONID', data_get($cache, 'cookie.0.Name')); $this->assertEquals('secret', data_get($cache, 'credentials.password')); $this->assertEquals(123, auth()->user()->mglnr); + $this->assertEquals('Max', auth()->user()->firstname); + $this->assertEquals('Muster', auth()->user()->lastname); + $this->assertTrue(auth()->check()); + } }