mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Tweaked some styles and started automated testing. Fixes #11.
This commit is contained in:
32
tests/AuthTest.php
Normal file
32
tests/AuthTest.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
class AuthTest extends TestCase
|
||||
{
|
||||
|
||||
public function testAuthWorking()
|
||||
{
|
||||
$this->visit('/')
|
||||
->seePageIs('/login');
|
||||
}
|
||||
|
||||
public function testLogin()
|
||||
{
|
||||
$this->visit('/')
|
||||
->seePageIs('/login')
|
||||
->type('admin@admin.com', '#email')
|
||||
->type('password', '#password')
|
||||
->press('Sign In')
|
||||
->seePageIs('/')
|
||||
->see('BookStack');
|
||||
}
|
||||
|
||||
public function testLogout()
|
||||
{
|
||||
$this->asAdmin()
|
||||
->visit('/')
|
||||
->seePageIs('/')
|
||||
->visit('/logout')
|
||||
->visit('/')
|
||||
->seePageIs('/login');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user