Updated tests

This commit is contained in:
James Cole
2018-05-31 20:04:19 +02:00
parent 68e7d45f63
commit fb07c68132
2 changed files with 11 additions and 0 deletions

View File

@@ -50,6 +50,8 @@ class PiggyBankTransformerTest extends TestCase
$repository = $this->mock(PiggyBankRepositoryInterface::class);
$repository->shouldReceive('setUser')->once();
$repository->shouldReceive('getCurrentAmount')->andReturn('12.34')->once();
$repository->shouldReceive('getSuggestedMonthlyAmount')->andReturn('12.34')->once();
// make new account and piggy
$account = Account::create(
@@ -94,10 +96,12 @@ class PiggyBankTransformerTest extends TestCase
$currencyRepos->shouldReceive('setUser')->once();
$currencyRepos->shouldReceive('findNull')->withArgs([1])->andReturn(TransactionCurrency::find(1))->once();
// mock repository:
$repository = $this->mock(PiggyBankRepositoryInterface::class);
$repository->shouldReceive('setUser')->once();
$repository->shouldReceive('getCurrentAmount')->andReturn('12.34')->once();
$repository->shouldReceive('getSuggestedMonthlyAmount')->andReturn('12.34')->once();
// make new account and piggy
$account = Account::create(
@@ -155,6 +159,7 @@ class PiggyBankTransformerTest extends TestCase
$repository = $this->mock(PiggyBankRepositoryInterface::class);
$repository->shouldReceive('setUser')->once();
$repository->shouldReceive('getCurrentAmount')->andReturn('12.34')->once();
$repository->shouldReceive('getSuggestedMonthlyAmount')->andReturn('12.34')->once();
// make new account and piggy
$account = Account::create(