Updated test code.

This commit is contained in:
James Cole 2016-01-19 16:55:53 +01:00
parent c2e04a11bf
commit ddaa53b940
3 changed files with 40 additions and 7 deletions

View File

@ -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;

View File

@ -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.'
);
} }
} }

View File

@ -9,6 +9,9 @@
*/ */
class HomeControllerTest extends TestCase class HomeControllerTest extends TestCase
{ {
/**
* @covers FireflyIII\Http\Controllers\HomeController::dateRange
*/
public function testDateRange() public function testDateRange()
{ {
@ -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());
} }
} }