Add firstname and lastname

This commit is contained in:
philipp lang 2021-06-19 00:58:31 +02:00
parent 56332395d9
commit 27651ce006
2 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,6 @@
<div class="p-10 grid gap-5">
<f-text id="mglnr" label="Mitgliedsnummer" v-model="values.mglnr"></f-text>
<f-text id="password" type="password" label="Passwort" v-model="values.password"></f-text>
<f-text id="groupid" name="groupid" label="Gruppierungsnummer" v-model="values.groupid"></f-text>
<button type="submit" class="btn btn-primary">Login</button>
</div>
</form>

View File

@ -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());
}
}