Expand tests.

This commit is contained in:
James Cole
2017-03-12 21:24:34 +01:00
parent aedc3fdff9
commit e53d294c1c
13 changed files with 448 additions and 6 deletions

View File

@@ -217,6 +217,7 @@ class AccountControllerTest extends TestCase
*/
public function testShowBrokenInitial()
{
// mock
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$date = new Carbon;
@@ -301,6 +302,7 @@ class AccountControllerTest extends TestCase
*/
public function testShowInitial()
{
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$date = new Carbon;
@@ -317,6 +319,7 @@ class AccountControllerTest extends TestCase
*/
public function testStore()
{
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(AccountRepositoryInterface::class);
$repository->shouldReceive('find')->andReturn(new Account)->once();
@@ -340,6 +343,7 @@ class AccountControllerTest extends TestCase
*/
public function testUpdate()
{
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$repository = $this->mock(AccountRepositoryInterface::class);
$repository->shouldReceive('find')->andReturn(new Account)->once();