Skip to content

Firefly III: a personal finances manager

Wrote more tests.

James Cole77560ab3a8df
diff --git a/tests/acceptance/Controllers/ControllerTest.php b/tests/acceptance/Controllers/ControllerTest.php
deleted file mode 100644
index 1017bc102d..0000000000
--- a/tests/acceptance/Controllers/ControllerTest.php
+++ /dev/null
@@ -1,120 +0,0 @@
-<?php
-/**
- * ControllerTest.php
- * Copyright (C) 2016 [email protected]
- *
- * 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.
- */
-
-
-/**
- * Generated by PHPUnit_SkeletonGenerator on 2016-12-10 at 05:51:41.
- */
-class ControllerTest 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\Controller::authorize
- * Implement testAuthorize().
- */
- public function testAuthorize()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers \FireflyIII\Http\Controllers\Controller::authorizeForUser
- * Implement testAuthorizeForUser().
- */
- public function testAuthorizeForUser()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers \FireflyIII\Http\Controllers\Controller::authorizeResource
- * Implement testAuthorizeResource().
- */
- public function testAuthorizeResource()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers \FireflyIII\Http\Controllers\Controller::dispatchNow
- * Implement testDispatchNow().
- */
- public function testDispatchNow()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers \FireflyIII\Http\Controllers\Controller::validate
- * Implement testValidate().
- */
- public function testValidate()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers \FireflyIII\Http\Controllers\Controller::validateWith
- * Implement testValidateWith().
- */
- public function testValidateWith()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * @covers \FireflyIII\Http\Controllers\Controller::validateWithBag
- * Implement testValidateWithBag().
- */
- public function testValidateWithBag()
- {
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
- }
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
-}
diff --git a/tests/acceptance/Controllers/CurrencyControllerTest.php b/tests/acceptance/Controllers/CurrencyControllerTest.php
index f96404ff32..47fd22badd 100644
--- a/tests/acceptance/Controllers/CurrencyControllerTest.php
+++ b/tests/acceptance/Controllers/CurrencyControllerTest.php
@@ -28,19 +28,18 @@ class CurrencyControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\CurrencyController::create
- * Implement testCreate().
*/
public function testCreate()
{
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->call('GET', route('currencies.create'));
+ $this->assertResponseStatus(200);
+ // has bread crumb
+ $this->see('<ol class="breadcrumb">');
}
/**
* @covers \FireflyIII\Http\Controllers\CurrencyController::defaultCurrency
- * Implement testDefaultCurrency().
*/
public function testDefaultCurrency()
{
@@ -52,19 +51,18 @@ class CurrencyControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\CurrencyController::delete
- * Implement testDelete().
*/
public function testDelete()
{
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->call('GET', route('currencies.delete', [2]));
+ $this->assertResponseStatus(200);
+ // has bread crumb
+ $this->see('<ol class="breadcrumb">');
}
/**
* @covers \FireflyIII\Http\Controllers\CurrencyController::destroy
- * Implement testDestroy().
*/
public function testDestroy()
{
@@ -76,31 +74,30 @@ class CurrencyControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\CurrencyController::edit
- * Implement testEdit().
*/
public function testEdit()
{
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->call('GET', route('currencies.edit', [2]));
+ $this->assertResponseStatus(200);
+ // has bread crumb
+ $this->see('<ol class="breadcrumb">');
}
/**
* @covers \FireflyIII\Http\Controllers\CurrencyController::index
- * Implement testIndex().
*/
public function testIndex()
{
- // Remove the following lines when you implement this test.
- $this->markTestIncomplete(
- 'This test has not been implemented yet.'
- );
+ $this->be($this->user());
+ $this->call('GET', route('currencies.index'));
+ $this->assertResponseStatus(200);
+ // has bread crumb
+ $this->see('<ol class="breadcrumb">');
}
/**
* @covers \FireflyIII\Http\Controllers\CurrencyController::store
- * Implement testStore().
*/
public function testStore()
{
@@ -112,7 +109,6 @@ class CurrencyControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\CurrencyController::update
- * Implement testUpdate().
*/
public function testUpdate()
{
@@ -121,12 +117,4 @@ class CurrencyControllerTest extends TestCase
'This test has not been implemented yet.'
);
}
-
- /**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- */
- protected function tearDown()
- {
- }
}