mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
create/get upload request backend
This commit is contained in:
@@ -25,9 +25,10 @@ class DashboardTest extends TestCase
|
||||
->assertStatus(200)
|
||||
->assertExactJson([
|
||||
'app' => [
|
||||
'earnings' => '$0.00',
|
||||
'license' => 'extended',
|
||||
'version' => config('vuefilemanager.version'),
|
||||
'earnings' => '$0.00',
|
||||
'isRunningCron' => false,
|
||||
'license' => 'extended',
|
||||
'version' => config('vuefilemanager.version'),
|
||||
],
|
||||
'disk' => [
|
||||
'download' => [
|
||||
|
||||
@@ -24,7 +24,7 @@ class UploadRequestTest extends TestCase
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function user_create_upload_request()
|
||||
public function user_create_upload_request_with_email()
|
||||
{
|
||||
$user = User::factory()
|
||||
->hasSettings()
|
||||
@@ -48,6 +48,32 @@ class UploadRequestTest extends TestCase
|
||||
Notification::assertTimesSent(1, UploadRequestNotification::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function user_create_upload_request_without_email()
|
||||
{
|
||||
$user = User::factory()
|
||||
->hasSettings()
|
||||
->create();
|
||||
|
||||
$this
|
||||
->actingAs($user)
|
||||
->postJson("/api/upload-request", [
|
||||
'folder_id' => '00cacdb9-1d09-4a32-8ad7-c0d45d66b758',
|
||||
'notes' => 'Please send me your files...',
|
||||
])
|
||||
->assertCreated();
|
||||
|
||||
$this->assertDatabasehas('upload_requests', [
|
||||
'folder_id' => '00cacdb9-1d09-4a32-8ad7-c0d45d66b758',
|
||||
'notes' => 'Please send me your files...',
|
||||
'email' => null,
|
||||
]);
|
||||
|
||||
Notification::assertNothingSent();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user