mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Fixed all tests.
This commit is contained in:
25
app/tests/controllers/TransactionControllerTest.php
Normal file
25
app/tests/controllers/TransactionControllerTest.php
Normal 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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user