Files
firefly-iii/tests/acceptance/Controllers/Auth/LoginControllerTest.php
James Cole 0fe0de1a7f New tests
2016-12-10 07:29:36 +01:00

65 lines
1.5 KiB
PHP

<?php
/**
* LoginControllerTest.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
namespace Auth;
use TestCase;
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:32.
*/
class LoginControllerTest extends TestCase
{
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
public function setUp()
{
parent::setUp();
}
/**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::login
*/
public function testLogin()
{
$this->visit('/login')
->type('thegrumpydictator@gmail.com', 'email')
->type('james', 'password')
->press('Sign In')
->seePageIs('/')
->see('thegrumpydictator@gmail.com');
}
/**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::logout
*/
public function testLogout()
{
$this->visit('/logout')
->seePageIs('/login')
->see('Sign in to start your session');
}
/**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::showLoginForm
*/
public function testShowLoginForm()
{
$this->visit('/')
->seePageIs('/login')
->see('Sign in to start your session');
}
}