Skip to content

Firefly III: a personal finances manager

Fix tests.

James Cole8883d185fe3b
diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php
index 88c617a621..f38af543d2 100644
--- a/app/Http/Controllers/Chart/BillController.php
+++ b/app/Http/Controllers/Chart/BillController.php
@@ -82,7 +82,7 @@ class BillController extends Controller
}
// get first transaction or today for start:
- $results = $repository->getJournals($bill);
+ $results = $repository->getJournals($bill, 1, 200);
// resort:
$results = $results->sortBy(
diff --git a/tests/acceptance/Controllers/BillControllerTest.php b/tests/acceptance/Controllers/BillControllerTest.php
index f687b17cd4..42ac6bafa6 100644
--- a/tests/acceptance/Controllers/BillControllerTest.php
+++ b/tests/acceptance/Controllers/BillControllerTest.php
@@ -7,6 +7,7 @@
* of the MIT license. See the LICENSE file for details.
*/
use Carbon\Carbon;
+use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
@@ -97,7 +98,7 @@ class BillControllerTest extends TestCase
public function testShow($range)
{
$repository = $this->mock('FireflyIII\Repositories\Bill\BillRepositoryInterface');
- $repository->shouldReceive('getJournals')->once()->andReturn(new Collection);
+ $repository->shouldReceive('getJournals')->once()->andReturn(new LengthAwarePaginator([], 0, 50));
$repository->shouldReceive('nextExpectedMatch')->once()->andReturn(new Carbon);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);