@@ 24-34 (lines=11) @@ | ||
21 | } |
|
22 | ||
23 | /** @test */ |
|
24 | public function it_should_return_access_denied_on_empty_credentials() |
|
25 | { |
|
26 | config()->set('auth.simple', [ |
|
27 | 'enabled' => true, |
|
28 | 'user' => 'testuser', |
|
29 | 'password' => 'testpass', |
|
30 | ]); |
|
31 | ||
32 | $response = $this->call('GET', 'url1', [], [], [], []); |
|
33 | $response->assertStatus(401); |
|
34 | } |
|
35 | ||
36 | /** @test */ |
|
37 | public function it_should_return_access_denied_on_wrong_credentials() |
|
@@ 50-61 (lines=12) @@ | ||
47 | } |
|
48 | ||
49 | /** @test */ |
|
50 | public function it_should_return_ok_on_disabled_auth() |
|
51 | { |
|
52 | config()->set('auth.simple', [ |
|
53 | 'enabled' => false, |
|
54 | 'user' => 'testuser', |
|
55 | 'password' => 'testpass', |
|
56 | ]); |
|
57 | ||
58 | $response = $this->call('GET', 'url1', [], [], [], []); |
|
59 | $response->assertStatus(200); |
|
60 | $response->assertSeeText('ok'); |
|
61 | } |
|
62 | ||
63 | /** @test */ |
|
64 | public function it_should_return_ok_with_credentials() |