Updated some tests.

This commit is contained in:
James Cole
2015-05-23 17:11:16 +02:00
parent 99d4adf5e6
commit 9e050fb059
19 changed files with 162 additions and 80 deletions

View File

@@ -145,6 +145,7 @@ class CategoryControllerTest extends TestCase
}
public function testStore()
{
// create

View File

@@ -231,6 +231,8 @@ class TransactionControllerTest extends TestCase
/**
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @covers FireflyIII\Models\Category::firstOrCreateEncrypted
* @covers FireflyIII\Models\Tag::firstOrCreateEncrypted
*/
public function testStore()
{
@@ -254,7 +256,7 @@ class TransactionControllerTest extends TestCase
'budget_id' => '0',
'create_another' => '1',
'category' => '',
'tags' => '',
'tags' => 'fat-test',
'piggy_bank_id' => '0',
'_token' => 'replaceMe',
];
@@ -277,6 +279,8 @@ class TransactionControllerTest extends TestCase
/**
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @covers FireflyIII\Models\Category::firstOrCreateEncrypted
* @covers FireflyIII\Models\Tag::firstOrCreateEncrypted
*/
public function testStoreTransfer()
{
@@ -314,7 +318,7 @@ class TransactionControllerTest extends TestCase
'budget_id' => '0',
'create_another' => '1',
'category' => '',
'tags' => '',
'tags' => 'fat-test',
'piggy_bank_id' => $piggy->id,
'_token' => 'replaceMe',
];
@@ -337,6 +341,8 @@ class TransactionControllerTest extends TestCase
/**
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @covers FireflyIII\Models\Category::firstOrCreateEncrypted
* @covers FireflyIII\Models\Tag::firstOrCreateEncrypted
*/
public function testUpdate()
{
@@ -362,7 +368,7 @@ class TransactionControllerTest extends TestCase
'date' => '2015-05-31',
'budget_id' => '0',
'category' => 'Lunch',
'tags' => '',
'tags' => 'fat-test',
'piggy_bank_id' => '0',
];
@@ -385,6 +391,8 @@ class TransactionControllerTest extends TestCase
/**
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @covers FireflyIII\Models\Category::firstOrCreateEncrypted
* @covers FireflyIII\Models\Tag::firstOrCreateEncrypted
*/
public function testUpdateWithRedirect()
{
@@ -411,7 +419,7 @@ class TransactionControllerTest extends TestCase
'budget_id' => '0',
'category' => 'Lunch',
'return_to_edit' => 1,
'tags' => '',
'tags' => 'fat-test',
'piggy_bank_id' => '0',
];

View File

@@ -611,6 +611,7 @@ class AccountRepositoryTest extends TestCase
* @covers FireflyIII\Repositories\Account\AccountRepository::storeAccount
* @covers FireflyIII\Repositories\Account\AccountRepository::storeMetadata
* @covers FireflyIII\Repositories\Account\AccountRepository::storeInitialBalance
*
*/
public function testStore()
{
@@ -686,6 +687,7 @@ class AccountRepositoryTest extends TestCase
* @covers FireflyIII\Repositories\Account\AccountRepository::storeAccount
* @covers FireflyIII\Repositories\Account\AccountRepository::storeMetadata
* @covers FireflyIII\Repositories\Account\AccountRepository::storeInitialBalance
* @covers FireflyII\Models\Account::firstOrNullEncrypted
* @expectedException Symfony\Component\HttpKernel\Exception\HttpException
*/
public function testStoreWithInvalidAccountData()