mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-02 03:51:18 +00:00
Update tests so repositories are not called. Saves on DB calls, speeds up tests.
This commit is contained in:
@@ -27,6 +27,7 @@ use FireflyIII\Http\Middleware\IsAdmin;
|
||||
use Route;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Tests\TestCase;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class IsAdminTest
|
||||
@@ -39,12 +40,13 @@ class IsAdminTest extends TestCase
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
Log::info(sprintf('Now in %s.', \get_class($this)));
|
||||
Route::middleware(IsAdmin::class)->any(
|
||||
'/_test/is-admin', function () {
|
||||
return 'OK';
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user