mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-02-04 03:22:51 +00:00
Basic testing, not full coverage.
This commit is contained in:
@@ -123,6 +123,8 @@ class TransactionControllerTest extends TestCase
|
||||
$this->_user->shouldReceive('getAttribute')->with('id')->once()->andReturn($journal->user_id);
|
||||
$this->_user->shouldReceive('getAttribute')->with('email')->andReturn('some@email');
|
||||
|
||||
$this->_piggies->shouldReceive('get')->once()->andReturn([]);
|
||||
|
||||
$this->action('GET', 'TransactionController@edit', $journal->id);
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
@@ -152,6 +154,8 @@ class TransactionControllerTest extends TestCase
|
||||
$this->_accounts->shouldReceive('getActiveDefaultAsSelectList')->andReturn([]);
|
||||
$this->_budgets->shouldReceive('getAsSelectList')->andReturn([]);
|
||||
|
||||
$this->_piggies->shouldReceive('get')->once()->andReturn([]);
|
||||
|
||||
// for binding
|
||||
Auth::shouldReceive('user')->andReturn($this->_user);
|
||||
Auth::shouldReceive('check')->andReturn(true);
|
||||
@@ -186,6 +190,7 @@ class TransactionControllerTest extends TestCase
|
||||
|
||||
$this->_accounts->shouldReceive('getActiveDefaultAsSelectList')->andReturn([]);
|
||||
$this->_budgets->shouldReceive('getAsSelectList')->andReturn([]);
|
||||
$this->_piggies->shouldReceive('get')->once()->andReturn([]);
|
||||
|
||||
// for binding
|
||||
Auth::shouldReceive('user')->andReturn($this->_user);
|
||||
|
||||
Reference in New Issue
Block a user