feat: Send chat messages on Enter keypress and optimize media test environments
This commit is contained in:
@@ -20,8 +20,8 @@ test('media can be attached to mutations, ledgers, and messages', function () {
|
||||
$this->actingAs($user);
|
||||
|
||||
// 1. Test attaching media to a mutation
|
||||
$file1 = UploadedFile::fake()->image('proof1.jpg');
|
||||
$file2 = UploadedFile::fake()->image('proof2.png');
|
||||
$file1 = UploadedFile::fake()->create('proof1.jpg', 100);
|
||||
$file2 = UploadedFile::fake()->create('proof2.png', 100);
|
||||
|
||||
$response = $this->post(route('dynamics.ledgers.mutations.store', [$dynamic, $ledger]), [
|
||||
'amount' => 50,
|
||||
@@ -42,7 +42,7 @@ test('media can be attached to mutations, ledgers, and messages', function () {
|
||||
Storage::disk('public')->assertExists($mutation->media->last()->file_path);
|
||||
|
||||
// 2. Test attaching media to a ledger
|
||||
$file3 = UploadedFile::fake()->image('rules.jpg');
|
||||
$file3 = UploadedFile::fake()->create('rules.jpg', 100);
|
||||
$response = $this->post(route('dynamics.ledgers.store', $dynamic), [
|
||||
'name' => 'Worship Ledger',
|
||||
'rules' => 'Specific rules',
|
||||
@@ -60,7 +60,7 @@ test('media can be attached to mutations, ledgers, and messages', function () {
|
||||
|
||||
// 3. Test attaching media to a chat message
|
||||
$chat = $dynamic->chat;
|
||||
$file4 = UploadedFile::fake()->image('chat_img.jpg');
|
||||
$file4 = UploadedFile::fake()->create('chat_img.jpg', 100);
|
||||
$response = $this->post(route('chats.messages.store', $chat), [
|
||||
'content' => 'Check this out!',
|
||||
'media' => [$file4],
|
||||
|
||||
Reference in New Issue
Block a user