mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Fixed api token endpoint documentation
This commit is contained in:
committed by
Constantin Graf
parent
4ea55e5867
commit
69a8c8bb2b
@@ -54,7 +54,7 @@ class ApiTokenEndpointTest extends ApiEndpointTestAbstract
|
||||
Passport::actingAs($data->user);
|
||||
|
||||
// Act
|
||||
$response = $this->withoutExceptionHandling()->postJson(route('api.v1.api-tokens.store'), [
|
||||
$response = $this->postJson(route('api.v1.api-tokens.store'), [
|
||||
'name' => 'Test Token',
|
||||
]);
|
||||
|
||||
@@ -118,7 +118,7 @@ class ApiTokenEndpointTest extends ApiEndpointTestAbstract
|
||||
$response = $this->postJson(route('api.v1.api-tokens.revoke', $token->id));
|
||||
|
||||
// Assert
|
||||
$this->assertResponseCode($response, 404);
|
||||
$this->assertResponseCode($response, 403);
|
||||
$this->assertDatabaseHas(Token::class, [
|
||||
'id' => $token->id,
|
||||
'revoked' => false,
|
||||
@@ -167,7 +167,7 @@ class ApiTokenEndpointTest extends ApiEndpointTestAbstract
|
||||
$response = $this->deleteJson(route('api.v1.api-tokens.destroy', $token->id));
|
||||
|
||||
// Assert
|
||||
$this->assertResponseCode($response, 404);
|
||||
$this->assertResponseCode($response, 403);
|
||||
$this->assertDatabaseHas(Token::class, [
|
||||
'id' => $token->id,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user