Fix various tests.

This commit is contained in:
James Cole 2017-02-12 13:15:23 +01:00
parent 79f94771c3
commit 1637190c27
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
6 changed files with 10 additions and 1 deletions

View File

@ -50,7 +50,6 @@ class RuleGroupFormRequest extends Request
{
/** @var RuleGroupRepositoryInterface $repository */
$repository = app(RuleGroupRepositoryInterface::class);
$repository->setUser(auth()->user());
$titleRule = 'required|between:1,100|uniqueObjectForUser:rule_groups,title';
if (!is_null($repository->find(intval($this->get('id')))->id)) {
$titleRule = 'required|between:1,100|uniqueObjectForUser:rule_groups,title,' . intval($this->get('id'));

View File

@ -11,6 +11,7 @@ declare(strict_types = 1);
namespace Tests\Feature\Controllers;
use FireflyIII\Repositories\User\UserRepositoryInterface;
use Tests\TestCase;
class ProfileControllerTest extends TestCase

View File

@ -11,6 +11,8 @@ declare(strict_types = 1);
namespace Tests\Feature\Controllers;
use FireflyIII\Models\Rule;
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
use Tests\TestCase;
class RuleControllerTest extends TestCase

View File

@ -11,6 +11,9 @@ declare(strict_types = 1);
namespace Tests\Feature\Controllers;
use Carbon\Carbon;
use FireflyIII\Models\RuleGroup;
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
use Tests\TestCase;
class RuleGroupControllerTest extends TestCase

View File

@ -11,6 +11,8 @@ declare(strict_types = 1);
namespace Tests\Feature\Controllers;
use FireflyIII\Support\Search\SearchInterface;
use Illuminate\Support\Collection;
use Tests\TestCase;
class SearchControllerTest extends TestCase

View File

@ -11,6 +11,8 @@ declare(strict_types = 1);
namespace Tests\Feature\Controllers;
use FireflyIII\Models\Tag;
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
use Tests\TestCase;
class TagControllerTest extends TestCase