From 68b136d3a1e149c09f5f6d2bfe7f834270a803ae Mon Sep 17 00:00:00 2001 From: seyedmr Date: Fri, 18 Nov 2022 18:14:25 +0330 Subject: [PATCH] test(upload json): add fakes add bus fakes and storage fakes --- app/Jobs/ChunkFile.php | 35 ++++++++++++++++++++++++ tests/Feature/Upload/ConvertJsonTest.php | 16 +++++++++-- 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 app/Jobs/ChunkFile.php diff --git a/app/Jobs/ChunkFile.php b/app/Jobs/ChunkFile.php new file mode 100644 index 0000000..b581bb9 --- /dev/null +++ b/app/Jobs/ChunkFile.php @@ -0,0 +1,35 @@ +post('/api/v1/convert/json', [ - 'file' => $file, - 'format' => 'json' - ])->assertSuccessful(); + 'file' => $file + ]) + ->assertSuccessful(); + + Storage::assertExists($file->name); + Bus::assertDispatched(ChunkFile::class, 1); } }