- send notification to native user when file request was sent via email

- updated mysql dump
This commit is contained in:
Čarodej
2022-05-18 09:50:21 +02:00
parent 3c28da2613
commit aa30b519fa
9 changed files with 84 additions and 12 deletions

View File

@@ -58,6 +58,36 @@ class UploadRequestTest extends TestCase
Notification::assertTimesSent(1, UploadRequestNotification::class);
}
/**
* @test
*/
public function user_create_upload_request_with_native_user_email()
{
$user = User::factory()
->hasSettings()
->create();
$recipient = User::factory()
->hasSettings()
->create();
$folder = Folder::factory()
->create([
'user_id' => $user->id,
]);
$this
->actingAs($user)
->postJson('/api/file-request', [
'folder_id' => $folder->id,
'email' => $recipient->email,
'notes' => 'Please send me your files...',
])
->assertCreated();
Notification::assertSentTo($recipient, UploadRequestNotification::class);
}
/**
* @test
*/