mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-18 15:39:50 +00:00
Fix tests.
This commit is contained in:
@@ -82,7 +82,7 @@ class BillController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get first transaction or today for start:
|
// get first transaction or today for start:
|
||||||
$results = $repository->getJournals($bill);
|
$results = $repository->getJournals($bill, 1, 200);
|
||||||
|
|
||||||
// resort:
|
// resort:
|
||||||
$results = $results->sortBy(
|
$results = $results->sortBy(
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
* of the MIT license. See the LICENSE file for details.
|
* of the MIT license. See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
|
|
||||||
@@ -97,7 +98,7 @@ class BillControllerTest extends TestCase
|
|||||||
public function testShow($range)
|
public function testShow($range)
|
||||||
{
|
{
|
||||||
$repository = $this->mock('FireflyIII\Repositories\Bill\BillRepositoryInterface');
|
$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);
|
$repository->shouldReceive('nextExpectedMatch')->once()->andReturn(new Carbon);
|
||||||
$this->be($this->user());
|
$this->be($this->user());
|
||||||
$this->changeDateRange($this->user(), $range);
|
$this->changeDateRange($this->user(), $range);
|
||||||
|
|||||||
Reference in New Issue
Block a user