Basic testing, not full coverage.

This commit is contained in:
James Cole
2014-08-19 13:24:11 +02:00
parent f5330728d4
commit f00dfd2859
17 changed files with 325 additions and 162 deletions

View File

@@ -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);