Fix JSON tests

This commit is contained in:
James Cole 2018-02-17 12:33:42 +01:00
parent 60b225d61c
commit 0f1cc46b71
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 2 additions and 0 deletions

View File

@ -229,6 +229,7 @@ $factory->define(
function (Faker\Generator $faker) {
return [
'id' => $faker->unique()->numberBetween(1000, 10000),
'user_id' => 1,
'created_at' => new Carbon,
'updated_at' => new Carbon,
'name' => $faker->words(3, true),

View File

@ -43,6 +43,7 @@ class FrontpageControllerTest extends TestCase
$piggy = $this->user()->piggyBanks()->first();
$repository = $this->mock(PiggyBankRepositoryInterface::class);
$repository->shouldReceive('getPiggyBanks')->andReturn(new Collection([$piggy]));
$repository->shouldReceive('getCurrentAmount')->andReturn('10');
$this->be($this->user());
$response = $this->get(route('json.fp.piggy-banks'));