]> BookStack Code Mirror - bookstack/blob - tests/AuthTest.php
Tweaked some styles and started automated testing. Fixes #11.
[bookstack] / tests / AuthTest.php
1 <?php
2
3 class AuthTest extends TestCase
4 {
5
6     public function testAuthWorking()
7     {
8         $this->visit('/')
9             ->seePageIs('/login');
10     }
11
12     public function testLogin()
13     {
14         $this->visit('/')
15             ->seePageIs('/login')
16             ->type('[email protected]', '#email')
17             ->type('password', '#password')
18             ->press('Sign In')
19             ->seePageIs('/')
20             ->see('BookStack');
21     }
22
23     public function testLogout()
24     {
25         $this->asAdmin()
26             ->visit('/')
27             ->seePageIs('/')
28             ->visit('/logout')
29             ->visit('/')
30             ->seePageIs('/login');
31     }
32 }