Fixed all tests.

This commit is contained in:
James Cole
2014-07-15 07:36:01 +02:00
parent 09b6c4d982
commit 445de5a1d8
7 changed files with 131 additions and 42 deletions

View File

@@ -0,0 +1,25 @@
<?php
class TransactionControllerTest extends TestCase
{
public function testCreateWithdrawal()
{
View::shouldReceive('share');
View::shouldReceive('make')->with('transactions.withdrawal')->andReturn(\Mockery::self())
->shouldReceive('with')->once()
->with('accounts', [])
->andReturn(Mockery::self());
// mock account repository:
$accounts = $this->mock('Firefly\Storage\Account\AccountRepositoryInterface');
$accounts->shouldReceive('getActiveDefaultAsSelectList')->andReturn([]);
// call
$this->call('GET', '/transactions/add/withdrawal');
// test
$this->assertResponseOk();
}
}