Some code cleanup.

This commit is contained in:
James Cole
2017-07-08 06:28:44 +02:00
parent de9728895e
commit 5ef2067836
53 changed files with 597 additions and 449 deletions

View File

@@ -94,7 +94,7 @@ class JsonControllerTest extends TestCase
$billRepos->shouldReceive('getBillsPaidInRange')->andReturn('-100');
$this->be($this->user());
$currency = Amount::getDefaultCurrency();
$currency = Amount::getDefaultCurrency();
$response = $this->get(route('json.box.paid'));
$response->assertStatus(200);
$response->assertExactJson(['amount' => Amount::formatAnything($currency, '100', false), 'amount_raw' => '100', 'box' => 'bills-paid']);
@@ -114,7 +114,7 @@ class JsonControllerTest extends TestCase
$this->be($this->user());
$currency = Amount::getDefaultCurrency();
$currency = Amount::getDefaultCurrency();
$response = $this->get(route('json.box.unpaid'));
$response->assertStatus(200);
$response->assertExactJson(['amount' => Amount::formatAnything($currency, '100', false), 'amount_raw' => '100', 'box' => 'bills-unpaid']);
@@ -141,7 +141,7 @@ class JsonControllerTest extends TestCase
$this->be($this->user());
$currency = Amount::getDefaultCurrency();
$currency = Amount::getDefaultCurrency();
$response = $this->get(route('json.box.in'));
$response->assertStatus(200);
$response->assertExactJson(['amount' => Amount::formatAnything($currency, '100', false), 'amount_raw' => '100', 'box' => 'in']);
@@ -167,7 +167,7 @@ class JsonControllerTest extends TestCase
$collector->shouldReceive('withOpposingAccount')->andReturnSelf()->once();
$this->be($this->user());
$currency = Amount::getDefaultCurrency();
$currency = Amount::getDefaultCurrency();
$response = $this->get(route('json.box.out'));
$response->assertStatus(200);
$response->assertExactJson(['amount' => Amount::formatAnything($currency, '100', false), 'amount_raw' => '100', 'box' => 'out']);