Expand tests.

This commit is contained in:
James Cole
2017-03-17 16:34:57 +01:00
parent fd1f06c2cb
commit e2f3788ff5
9 changed files with 63 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Steam;
use Tests\TestCase;
class CategoryControllerTest extends TestCase
@@ -114,6 +115,7 @@ class CategoryControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\CategoryController::noCategory
* @covers \FireflyIII\Http\Controllers\CategoryController::noCategoryPeriodEntries
* @dataProvider dateRangeProvider
*
* @param string $range
@@ -137,6 +139,7 @@ class CategoryControllerTest extends TestCase
$collector->shouldReceive('disableInternalFilter')->andReturnSelf();
$collector->shouldReceive('setLimit')->andReturnSelf();
Steam::shouldReceive('positive')->once()->andReturn('1');
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
@@ -148,6 +151,7 @@ class CategoryControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\CategoryController::noCategory
* @covers \FireflyIII\Http\Controllers\CategoryController::noCategoryPeriodEntries
* @dataProvider dateRangeProvider
*
* @param string $range
@@ -181,6 +185,7 @@ class CategoryControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\CategoryController::noCategory
* @covers \FireflyIII\Http\Controllers\CategoryController::noCategoryPeriodEntries
* @dataProvider dateRangeProvider
*
* @param string $range
@@ -204,6 +209,8 @@ class CategoryControllerTest extends TestCase
$collector->shouldReceive('disableInternalFilter')->andReturnSelf();
$collector->shouldReceive('setLimit')->andReturnSelf();
Steam::shouldReceive('positive')->once()->andReturn('1');
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$response = $this->get(route('categories.no-category', ['2016-01-01']));