mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
sharing route refactoring
This commit is contained in:
@@ -19,7 +19,7 @@ class VisitorBrowseTest extends TestCase
|
||||
'is_protected' => 0,
|
||||
]);
|
||||
|
||||
$this->get("/api/browse/share/$share->token")
|
||||
$this->get("/api/sharing/$share->token")
|
||||
->assertStatus(200)
|
||||
->assertExactJson([
|
||||
'data' => [
|
||||
@@ -63,7 +63,7 @@ class VisitorBrowseTest extends TestCase
|
||||
*/
|
||||
public function it_try_to_get_deleted_share_record()
|
||||
{
|
||||
$this->get('/api/browse/share/19ZMPNiass4ZqWwQ')
|
||||
$this->get('/api/sharing/19ZMPNiass4ZqWwQ')
|
||||
->assertNotFound();
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ class VisitorBrowseTest extends TestCase
|
||||
|
||||
$this
|
||||
->withUnencryptedCookies($cookie)
|
||||
->get("/api/browse/folders/$root->id/$share->token")
|
||||
->get("/api/sharing/folders/$root->id/$share->token")
|
||||
->assertStatus(200)
|
||||
->assertJsonFragment([
|
||||
'id' => $file->id,
|
||||
@@ -192,7 +192,7 @@ class VisitorBrowseTest extends TestCase
|
||||
|
||||
// Check public shared item
|
||||
if (! $is_protected) {
|
||||
$this->getJson("/api/browse/folders/$root->id/$share->token")
|
||||
$this->getJson("/api/sharing/folders/$root->id/$share->token")
|
||||
->assertStatus(200)
|
||||
->assertJsonFragment([
|
||||
'id' => $file->id,
|
||||
|
||||
@@ -89,7 +89,7 @@ class SharedZippingTest extends TestCase
|
||||
|
||||
$this
|
||||
->withUnencryptedCookies($cookie)
|
||||
->get("/api/zip/{$share->token}?items=$files[0]|file,$files[1]|file,$folder->id|folder")
|
||||
->get("/api/sharing/zip/{$share->token}?items=$files[0]|file,$files[1]|file,$folder->id|folder")
|
||||
->assertStatus(200)
|
||||
->assertHeader('content-type', 'application/x-zip');
|
||||
}
|
||||
@@ -97,7 +97,7 @@ class SharedZippingTest extends TestCase
|
||||
// Check public shared item
|
||||
if (! $is_protected) {
|
||||
$this
|
||||
->get("/api/zip/{$share->token}?items=$files[0]|file,$files[1]|file,$folder->id|folder")
|
||||
->get("/api/sharing/zip/{$share->token}?items=$files[0]|file,$files[1]|file,$folder->id|folder")
|
||||
->assertStatus(200)
|
||||
->assertHeader('content-type', 'application/x-zip');
|
||||
}
|
||||
@@ -152,14 +152,14 @@ class SharedZippingTest extends TestCase
|
||||
|
||||
$this
|
||||
->withUnencryptedCookies($cookie)
|
||||
->get("/api/zip/$share->token?items=$files[0]|file,$files[1]|file")
|
||||
->get("/api/sharing/zip/$share->token?items=$files[0]|file,$files[1]|file")
|
||||
->assertStatus(403);
|
||||
}
|
||||
|
||||
// Check public shared item
|
||||
if (! $is_protected) {
|
||||
$this
|
||||
->get("/api/zip/$share->token?items=$files[0]|file,$files[1]|file")
|
||||
->get("/api/sharing/zip/$share->token?items=$files[0]|file,$files[1]|file")
|
||||
->assertStatus(403);
|
||||
}
|
||||
|
||||
@@ -267,13 +267,13 @@ class SharedZippingTest extends TestCase
|
||||
|
||||
$this
|
||||
->withUnencryptedCookies($cookie)
|
||||
->get("/api/zip/$share->token?items=$folder->id|folder")
|
||||
->get("/api/sharing/zip/$share->token?items=$folder->id|folder")
|
||||
->assertStatus(403);
|
||||
}
|
||||
|
||||
// Check public shared item
|
||||
if (! $is_protected) {
|
||||
$this->getJson("/api/zip/$share->token?items=$folder->id|folder")
|
||||
$this->getJson("/api/sharing/zip/$share->token?items=$folder->id|folder")
|
||||
->assertStatus(403);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user