mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
api refactoring
This commit is contained in:
@@ -109,26 +109,32 @@ class FixedBillingRestrictionsTest extends TestCase
|
||||
'name' => 'Company Project',
|
||||
'invitations' => [
|
||||
[
|
||||
'type' => 'invitation',
|
||||
'email' => 'test@doe.com',
|
||||
'permission' => 'can-edit',
|
||||
],
|
||||
[
|
||||
'type' => 'invitation',
|
||||
'email' => 'test2@doe.com',
|
||||
'permission' => 'can-edit',
|
||||
],
|
||||
[
|
||||
'type' => 'invitation',
|
||||
'email' => 'test3@doe.com',
|
||||
'permission' => 'can-edit',
|
||||
],
|
||||
[
|
||||
'type' => 'invitation',
|
||||
'email' => 'test4@doe.com',
|
||||
'permission' => 'can-edit',
|
||||
],
|
||||
[
|
||||
'type' => 'invitation',
|
||||
'email' => 'test5@doe.com',
|
||||
'permission' => 'can-edit',
|
||||
],
|
||||
[
|
||||
'type' => 'invitation',
|
||||
'email' => 'test6@doe.com',
|
||||
'permission' => 'can-edit',
|
||||
],
|
||||
@@ -143,6 +149,7 @@ class FixedBillingRestrictionsTest extends TestCase
|
||||
'name' => 'Company Project',
|
||||
'invitations' => [
|
||||
[
|
||||
'type' => 'invitation',
|
||||
'email' => $members[0]->email,
|
||||
'permission' => 'can-edit',
|
||||
],
|
||||
|
||||
@@ -46,7 +46,7 @@ class PersonalAccessTokenTest extends TestCase
|
||||
$this
|
||||
->actingAs($user)
|
||||
->deleteJson("/api/user/tokens/$token_id")
|
||||
->assertStatus(204);
|
||||
->assertStatus(200);
|
||||
|
||||
$this->assertDatabaseMissing('personal_access_tokens', [
|
||||
'id' => $token_id,
|
||||
|
||||
@@ -309,7 +309,7 @@ class SignFlowTest extends TestCase
|
||||
$user = User::factory()
|
||||
->create(['email' => 'john@doe.com']);
|
||||
|
||||
$this->postJson('/api/password/email', [
|
||||
$this->postJson('/api/password/recover', [
|
||||
'email' => $user->email,
|
||||
])->assertStatus(200);
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ class UserAccountTest extends TestCase
|
||||
'current' => 'secret',
|
||||
'password' => 'VerySecretPassword',
|
||||
'password_confirmation' => 'VerySecretPassword',
|
||||
])->assertStatus(204);
|
||||
])->assertStatus(200);
|
||||
|
||||
$this
|
||||
->actingAs($user)
|
||||
@@ -101,7 +101,7 @@ class UserAccountTest extends TestCase
|
||||
->patchJson('/api/user/settings', [
|
||||
'name' => 'address',
|
||||
'value' => 'Jantar',
|
||||
])->assertStatus(204);
|
||||
])->assertStatus(200);
|
||||
|
||||
$this->assertDatabaseHas('user_settings', [
|
||||
'address' => 'Jantar',
|
||||
@@ -122,9 +122,13 @@ class UserAccountTest extends TestCase
|
||||
|
||||
$this
|
||||
->actingAs($user)
|
||||
->patchJson('/api/user/settings', [
|
||||
->postJson('/api/user/avatar', [
|
||||
'avatar' => $avatar,
|
||||
])->assertStatus(204);
|
||||
])
|
||||
->assertStatus(200)
|
||||
->assertJsonFragment([
|
||||
'message' => 'The avatar was successfully updated.',
|
||||
]);
|
||||
|
||||
collect(config('vuefilemanager.avatar_sizes'))
|
||||
->each(
|
||||
@@ -246,10 +250,10 @@ class UserAccountTest extends TestCase
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
|
||||
$this->postJson('/api/user/email/verify/resend', [
|
||||
$this->postJson('/api/user/verify', [
|
||||
'email' => $user->email,
|
||||
])
|
||||
->assertStatus(204);
|
||||
->assertStatus(200);
|
||||
|
||||
Notification::assertTimesSent(1, VerifyEmail::class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user