create AccessToken route(Vue)

This commit is contained in:
Milos Holba
2021-05-28 16:47:14 +02:00
parent 6456950081
commit 9189d73df9
8 changed files with 115 additions and 75 deletions
+4 -2
View File
@@ -166,11 +166,13 @@ class UserAccountTest extends TestCase
Sanctum::actingAs($user);
$this->postJson('/api/user/token/create')
->assertStatus(201);
$this->postJson('/api/user/token/create', [
'name' => 'token'
])->assertStatus(201);
$this->assertDatabaseHas('personal_access_tokens', [
'tokenable_id' => $user->id,
'name' => 'token'
]);
}