diff --git a/tests/Feature/LoginTest.php b/tests/Feature/LoginTest.php new file mode 100644 index 00000000..71e8de43 --- /dev/null +++ b/tests/Feature/LoginTest.php @@ -0,0 +1,35 @@ +withoutExceptionHandling(); + $this->fakeNamiMembers([ + [ 'gruppierungId' => 11222, 'vorname' => 'Max', 'id' => 123 ] + ]); + $this->fakeNamiPassword(123, 'secret', [11222]); + + $this->post('/login', [ + 'groupid' => 11222, + 'mglnr' => 123, + 'password' => 'secret' + ]); + + $cache = Cache::get('namicookie-123'); + $this->assertEquals('JSESSIONID', data_get($cache, 'cookie.0.Name')); + $this->assertEquals('123', data_get($cache, 'data.mitgliedsnr')); + } +}