Push updated tests.

This commit is contained in:
James Cole
2018-03-28 19:38:20 +02:00
parent be5c44af61
commit 0a71077513
55 changed files with 344 additions and 266 deletions

View File

@@ -31,6 +31,7 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use Illuminate\Support\Collection;
use Log;
use Mockery;
use Tests\TestCase;
/**
@@ -112,6 +113,9 @@ class BoxControllerTest extends TestCase
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
$accountRepos->shouldReceive('getActiveAccountsByType')->andReturn(new Collection([$this->user()->accounts()->first()]));
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1');
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'accountRole'])->andReturn('ccAsset');
$this->be($this->user());
$response = $this->get(route('json.box.net-worth'));
$response->assertStatus(200);
@@ -126,6 +130,8 @@ class BoxControllerTest extends TestCase
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
$accountRepos->shouldReceive('getActiveAccountsByType')->andReturn(new Collection([$this->user()->accounts()->first()]));
$currencyRepos->shouldReceive('findNull')->andReturn(TransactionCurrency::find(1));
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'currency_id'])->andReturn('1');
$accountRepos->shouldReceive('getMetaValue')->withArgs([Mockery::any(), 'accountRole'])->andReturn('ccAsset');
$start = new Carbon;
$start->addMonths(6)->startOfMonth();