functionality for setting default folders for app installation

This commit is contained in:
Peter Papp
2021-02-27 11:49:01 +01:00
parent 3328fdebb0
commit f55472442f
9 changed files with 101 additions and 78 deletions

View File

@@ -7,6 +7,7 @@ use App\Models\Folder;
use App\Models\User;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\Sanctum\Sanctum;
use Storage;
use Tests\TestCase;
class UserTest extends TestCase
@@ -29,6 +30,9 @@ class UserTest extends TestCase
$this->assertDatabaseHas('user_settings', [
'user_id' => $user->id,
]);
Storage::disk('local')
->assertExists('files/' . User::first()->id);
}
/**
@@ -50,6 +54,9 @@ class UserTest extends TestCase
$this->assertDatabaseHas('user_settings', [
'name' => 'John Doe',
]);
Storage::disk('local')
->assertExists('files/' . User::first()->id);
}
/**