mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Updated test code.
This commit is contained in:
parent
c2e04a11bf
commit
ddaa53b940
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace FireflyIII\Http\Controllers;
|
namespace FireflyIII\Http\Controllers;
|
||||||
|
|
||||||
|
|
||||||
use Crypt;
|
use Crypt;
|
||||||
use File;
|
use File;
|
||||||
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
|
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
*/
|
*/
|
||||||
class AccountControllerTest extends TestCase
|
class AccountControllerTest extends TestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\AccountController::create
|
||||||
|
*/
|
||||||
public function testCreate()
|
public function testCreate()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@ -19,6 +22,9 @@ class AccountControllerTest extends TestCase
|
|||||||
$this->assertEquals(200, $response->status());
|
$this->assertEquals(200, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\AccountController::delete
|
||||||
|
*/
|
||||||
public function testDelete()
|
public function testDelete()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@ -26,6 +32,9 @@ class AccountControllerTest extends TestCase
|
|||||||
$this->assertEquals(200, $response->status());
|
$this->assertEquals(200, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\AccountController::destroy
|
||||||
|
*/
|
||||||
public function testDestroy()
|
public function testDestroy()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@ -41,6 +50,9 @@ class AccountControllerTest extends TestCase
|
|||||||
$this->assertEquals(302, $response->status());
|
$this->assertEquals(302, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\AccountController::edit
|
||||||
|
*/
|
||||||
public function testEdit()
|
public function testEdit()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@ -48,6 +60,9 @@ class AccountControllerTest extends TestCase
|
|||||||
$this->assertEquals(200, $response->status());
|
$this->assertEquals(200, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\AccountController::index
|
||||||
|
*/
|
||||||
public function testIndex()
|
public function testIndex()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@ -55,6 +70,9 @@ class AccountControllerTest extends TestCase
|
|||||||
$this->assertEquals(200, $response->status());
|
$this->assertEquals(200, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\AccountController::show
|
||||||
|
*/
|
||||||
public function testShow()
|
public function testShow()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@ -62,6 +80,9 @@ class AccountControllerTest extends TestCase
|
|||||||
$this->assertEquals(200, $response->status());
|
$this->assertEquals(200, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\AccountController::store
|
||||||
|
*/
|
||||||
public function testStore()
|
public function testStore()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@ -81,9 +102,15 @@ class AccountControllerTest extends TestCase
|
|||||||
$this->markTestIncomplete();
|
$this->markTestIncomplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\AccountController::update
|
||||||
|
* @todo Implement testUpdate().
|
||||||
|
*/
|
||||||
public function testUpdate()
|
public function testUpdate()
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
// Remove the following lines when you implement this test.
|
||||||
|
$this->markTestIncomplete(
|
||||||
|
'This test has not been implemented yet.'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,14 +9,17 @@
|
|||||||
*/
|
*/
|
||||||
class HomeControllerTest extends TestCase
|
class HomeControllerTest extends TestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\HomeController::dateRange
|
||||||
|
*/
|
||||||
public function testDateRange()
|
public function testDateRange()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
|
|
||||||
$args = [
|
$args = [
|
||||||
'start' => '2012-01-01',
|
'start' => '2012-01-01',
|
||||||
'end' => '2012-04-01',
|
'end' => '2012-04-01',
|
||||||
'_token' => Session::token(),
|
'_token' => Session::token(),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -26,6 +29,9 @@ class HomeControllerTest extends TestCase
|
|||||||
$this->assertSessionHas('warning', '91 days of data may take a while to load.');
|
$this->assertSessionHas('warning', '91 days of data may take a while to load.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\HomeController::flush
|
||||||
|
*/
|
||||||
public function testFlush()
|
public function testFlush()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
@ -33,12 +39,13 @@ class HomeControllerTest extends TestCase
|
|||||||
$this->assertEquals(302, $response->status());
|
$this->assertEquals(302, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers FireflyIII\Http\Controllers\HomeController::index
|
||||||
|
*/
|
||||||
public function testIndex()
|
public function testIndex()
|
||||||
{
|
{
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$response = $this->call('GET', '/');
|
$response = $this->call('GET', '/');
|
||||||
$this->assertEquals(200, $response->status());
|
$this->assertEquals(200, $response->status());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user