Completed
Push — master ( 0ca83f...63d559 )
by Mahmoud
05:04
created

AccessDashboardTest::testProtectedDashboardRoute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace App\Containers\Authentication\UI\WEB\Tests\Functional;
4
5
use App\Containers\Authentication\Tests\WebTestCase;
6
7
/**
8
 * Class AccessDashboardTest
9
 *
10
 * @author  Johan Alvarez <[email protected]>
11
 * @author  Mahmoud Zalt  <[email protected]>
12
 */
13
class AccessDashboardTest extends WebTestCase
14
{
15
16
    protected $endpoint = '/dashboard';
17
18
    public function testProtectedDashboardRoute()
19
    {
20
        // go to the protected page, without login
21
        $response = $this->get($this->endpoint);
22
23
        // should be redirected to login page
24
        $response->assertResponseStatus(302);
25
        $this->assertRedirectedTo('login');
26
        $this->see('login');
27
    }
28
}
29