mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
test groups refactoring
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace Tests\Feature\Accounts;
|
||||
|
||||
use App\Models\File;
|
||||
use App\Models\Folder;
|
||||
use App\Models\User;
|
||||
use Domain\Settings\Models\File;
|
||||
use Domain\Settings\Models\Folder;
|
||||
use Domain\Settings\Models\User;
|
||||
use Tests\TestCase;
|
||||
|
||||
class PersonalAccessTokenTest extends TestCase
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace Tests\Feature\Accounts;
|
||||
|
||||
use App\Models\Setting;
|
||||
use App\Models\User;
|
||||
use Domain\Settings\Models\Setting;
|
||||
use Domain\Settings\Models\User;
|
||||
use App\Notifications\ResetPassword;
|
||||
use Illuminate\Auth\Notifications\VerifyEmail;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
@@ -107,9 +107,9 @@ class SignFlowTest extends TestCase
|
||||
$user = User::factory(User::class)
|
||||
->create();
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$this->postJson('/logout')
|
||||
$this
|
||||
->actingAs($user)
|
||||
->postJson('/logout')
|
||||
->assertStatus(204);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ namespace Tests\Feature\Accounts;
|
||||
use Storage;
|
||||
use Notification;
|
||||
use Tests\TestCase;
|
||||
use App\Models\User;
|
||||
use Domain\Settings\Models\User;
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
use App\Services\SetupService;
|
||||
use Domain\SetupWizard\Services\SetupService;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Auth\Notifications\VerifyEmail;
|
||||
@@ -48,9 +48,9 @@ class UserAccountTest extends TestCase
|
||||
$user = User::factory(User::class)
|
||||
->create();
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$this->postJson('/api/user/password', [
|
||||
$this
|
||||
->actingAs($user)
|
||||
->postJson('/api/user/password', [
|
||||
'current_password' => 'secret',
|
||||
'password' => 'VerySecretPassword',
|
||||
'password_confirmation' => 'VerySecretPassword',
|
||||
@@ -67,9 +67,9 @@ class UserAccountTest extends TestCase
|
||||
$user = User::factory(User::class)
|
||||
->create();
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$this->patchJson('/api/user/relationships/settings', [
|
||||
$this
|
||||
->actingAs($user)
|
||||
->patchJson('/api/user/relationships/settings', [
|
||||
'name' => 'address',
|
||||
'value' => 'Jantar',
|
||||
])->assertStatus(204);
|
||||
@@ -84,17 +84,15 @@ class UserAccountTest extends TestCase
|
||||
*/
|
||||
public function it_update_user_avatar()
|
||||
{
|
||||
$this->setup->create_directories();
|
||||
|
||||
$user = User::factory(User::class)
|
||||
->create();
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$avatar = UploadedFile::fake()
|
||||
->image('fake-image.jpg');
|
||||
|
||||
$this->patchJson('/api/user/relationships/settings', [
|
||||
$this
|
||||
->actingAs($user)
|
||||
->patchJson('/api/user/relationships/settings', [
|
||||
'avatar' => $avatar,
|
||||
])->assertStatus(204);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user