mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 07:38:29 +00:00
Fixed some basic tests.
This commit is contained in:
68
tests/controllers/HomeControllerTest.php
Normal file
68
tests/controllers/HomeControllerTest.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Generated by PHPUnit_SkeletonGenerator on 2015-03-08 at 20:05:14.
|
||||
*/
|
||||
class HomeControllerTest 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();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\HomeController::dateRange
|
||||
*/
|
||||
public function testDateRange()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\HomeController::flush
|
||||
*/
|
||||
public function testFlush()
|
||||
{
|
||||
// Remove the following lines when you implement this test.
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\HomeController::index
|
||||
*/
|
||||
public function testIndexNoLogin()
|
||||
{
|
||||
$response = $this->call('GET', '/');
|
||||
$this->assertRedirectedTo('auth/login');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FireflyIII\Http\Controllers\HomeController::index
|
||||
*/
|
||||
public function testIndexLoggedIn()
|
||||
{
|
||||
$this->be(new FireflyIII\User);
|
||||
$response = $this->call('GET', '/');
|
||||
$this->assertResponseOk();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user