sharing route refactoring

This commit is contained in:
Čarodej
2022-05-16 12:33:09 +02:00
parent 68dc04963d
commit f66982b3ec
6 changed files with 87 additions and 13 deletions

View File

@@ -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);
}
});