mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
api refactoring
This commit is contained in:
@@ -31,13 +31,12 @@ class UserZippingTest extends TestCase
|
||||
$file = UploadedFile::fake()
|
||||
->create("fake-inner-file-$index.pdf", 1200, 'application/pdf');
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'name' => $file->name,
|
||||
'extension' => 'pdf',
|
||||
'file' => $file,
|
||||
'parent_id' => $folder->id,
|
||||
'path' => "/$file->name",
|
||||
'is_last' => 'true',
|
||||
$this->postJson('/api/upload/chunks', [
|
||||
'name' => $file->name,
|
||||
'extension' => 'pdf',
|
||||
'chunk' => $file,
|
||||
'parent_id' => $folder->id,
|
||||
'is_last_chunk' => 1,
|
||||
])->assertStatus(201);
|
||||
});
|
||||
|
||||
@@ -46,13 +45,11 @@ class UserZippingTest extends TestCase
|
||||
$file = UploadedFile::fake()
|
||||
->create("fake-file-$index.pdf", 1200, 'application/pdf');
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'name' => $file->name,
|
||||
'extension' => 'pdf',
|
||||
'file' => $file,
|
||||
'parent_id' => null,
|
||||
'path' => "/$file->name",
|
||||
'is_last' => 'true',
|
||||
$this->postJson('/api/upload/chunks', [
|
||||
'name' => $file->name,
|
||||
'extension' => 'pdf',
|
||||
'chunk' => $file,
|
||||
'is_last_chunk' => 1,
|
||||
])->assertStatus(201);
|
||||
});
|
||||
|
||||
@@ -88,13 +85,12 @@ class UserZippingTest extends TestCase
|
||||
$file = UploadedFile::fake()
|
||||
->create("fake-file-$index.pdf", 1200, 'application/pdf');
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'name' => $file->name,
|
||||
'extension' => 'pdf',
|
||||
'file' => $file,
|
||||
'parent_id' => $folder->id,
|
||||
'path' => "/$file->name",
|
||||
'is_last' => 'true',
|
||||
$this->postJson('/api/upload/chunks', [
|
||||
'name' => $file->name,
|
||||
'extension' => 'pdf',
|
||||
'chunk' => $file,
|
||||
'parent_id' => $folder->id,
|
||||
'is_last_chunk' => 1,
|
||||
])->assertStatus(201);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user