mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Cover endOfPeriod method of the Navigation class
The custom frequency requires a timezone configuration, forcing it to run in the integration test scope. Running the integration tests requires a database connection in the build process. It enables other case tests. The API Tests cause interference in other tests, requiring isolating them.
This commit is contained in:
@@ -23,8 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Tests\integration\Api\Autocomplete;
|
||||
|
||||
use Laravel\Passport\Passport;
|
||||
use Log;
|
||||
use Tests\integration\TestCase;
|
||||
|
||||
/**
|
||||
@@ -32,33 +30,16 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
class AccountControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
Passport::actingAs($this->user());
|
||||
Log::info(sprintf('Now in %s.', get_class($this)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Api\V1\Controllers\Autocomplete\AccountController
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
public function testAccounts(): void
|
||||
public function testGivenAnUnauthenticatedRequestWhenCallingTheAccountsEndpointThenReturns401HttpCode(): void
|
||||
{
|
||||
// test API
|
||||
$response = $this->get(route('api.v1.autocomplete.accounts'), ['Accept' => 'application/json']);
|
||||
$response->assertStatus(200);
|
||||
$response->assertStatus(401);
|
||||
$response->assertHeader('Content-Type', 'application/json');
|
||||
$response->assertSee('Checking Account');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function testBasic(): void
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
$response->assertContent('{"message":"Unauthenticated","exception":"AuthenticationException"}');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user