mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 19:10:40 +00:00
unit test fixes
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+2
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
|||||||
|
/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */
|
||||||
+1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{oBQg:function(e,t,r){"use strict";r.r(t);var n=r("L2JU");function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i={name:"SetupWizard",computed:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Object(n.b)(["config"])),mounted:function(){var e=this.$root.$data.config.installation;e&&"setup-done"===e&&this.$router.push({name:"SignIn"})}},u=r("KHd+"),a=Object(u.a)(i,(function(){var e=this.$createElement;return(this._self._c||e)("router-view")}),[],!1,null,null,null);t.default=a.exports}}]);
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{oBQg:function(e,t,r){"use strict";r.r(t);var n=r("L2JU");function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i={name:"SetupWizard",computed:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Object(n.b)(["config"])),mounted:function(){var e=this.$root.$data.config.installation;e&&"setup-done"===e&&this.$router.push({name:"SignIn"})}},u=r("KHd+"),a=Object(u.a)(i,(function(){var e=this.$createElement;return(this._self._c||e)("router-view")}),[],!1,null,null,null);t.default=a.exports}}]);
|
||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
-5
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+30
@@ -0,0 +1,30 @@
|
|||||||
|
/*!
|
||||||
|
* The buffer module from node.js, for the browser.
|
||||||
|
*
|
||||||
|
* @author Feross Aboukhadijeh <http://feross.org>
|
||||||
|
* @license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @licstart The following is the entire license notice for the
|
||||||
|
* Javascript code in this page
|
||||||
|
*
|
||||||
|
* Copyright 2020 Mozilla Foundation
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
* @licend The above is the entire license notice for the
|
||||||
|
* Javascript code in this page
|
||||||
|
*/
|
||||||
@@ -172,13 +172,7 @@ class UserAccountTest extends TestCase
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'favourites' => [
|
'favourites' => [
|
||||||
'data' => [
|
'data' => [],
|
||||||
'id' => (string) $user->id,
|
|
||||||
'type' => 'favourite_folders',
|
|
||||||
'attributes' => [
|
|
||||||
'folders' => [],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Tests\Domain\Browsing;
|
namespace Tests\Domain\Browsing;
|
||||||
|
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
@@ -59,8 +60,8 @@ class BrowseTest extends TestCase
|
|||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertExactJson([
|
->assertExactJson([
|
||||||
[
|
[
|
||||||
'name' => 'Files',
|
'name' => 'Files',
|
||||||
'folders' => [
|
'folders' => [
|
||||||
[
|
[
|
||||||
'id' => $folder_level_1->id,
|
'id' => $folder_level_1->id,
|
||||||
'parent_id' => null,
|
'parent_id' => null,
|
||||||
@@ -109,8 +110,8 @@ class BrowseTest extends TestCase
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'Team Folders',
|
'name' => 'Team Folders',
|
||||||
'folders' => [],
|
'folders' => [],
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -152,55 +153,14 @@ class BrowseTest extends TestCase
|
|||||||
->actingAs($user)
|
->actingAs($user)
|
||||||
->getJson("/api/browse/folders/$root->id")
|
->getJson("/api/browse/folders/$root->id")
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertExactJson([
|
->assertJsonFragment([
|
||||||
[
|
'id' => $root->id,
|
||||||
'id' => $folder->id,
|
])
|
||||||
'user_id' => $user->id,
|
->assertJsonFragment([
|
||||||
'parent_id' => $root->id,
|
'id' => $file->id,
|
||||||
'name' => 'Documents',
|
])
|
||||||
'color' => null,
|
->assertJsonFragment([
|
||||||
'emoji' => null,
|
'id' => $folder->id,
|
||||||
'author' => 'user',
|
|
||||||
'deleted_at' => null,
|
|
||||||
'created_at' => $folder->created_at,
|
|
||||||
'updated_at' => $folder->updated_at->toJson(),
|
|
||||||
'items' => 0,
|
|
||||||
'trashed_items' => 0,
|
|
||||||
'type' => 'folder',
|
|
||||||
'parent' => [
|
|
||||||
'id' => $root->id,
|
|
||||||
'name' => 'root',
|
|
||||||
'items' => 2,
|
|
||||||
'trashed_items' => 2,
|
|
||||||
'type' => 'folder',
|
|
||||||
],
|
|
||||||
'shared' => null,
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'id' => $file->id,
|
|
||||||
'user_id' => $user->id,
|
|
||||||
'folder_id' => $root->id,
|
|
||||||
'thumbnail' => null,
|
|
||||||
'name' => 'Document',
|
|
||||||
'basename' => 'document.pdf',
|
|
||||||
'mimetype' => 'application/pdf',
|
|
||||||
'filesize' => $file->filesize,
|
|
||||||
'type' => 'file',
|
|
||||||
'metadata' => null,
|
|
||||||
'author' => 'user',
|
|
||||||
'deleted_at' => null,
|
|
||||||
'created_at' => $file->created_at,
|
|
||||||
'updated_at' => $file->updated_at->toJson(),
|
|
||||||
'file_url' => 'http://localhost/file/document.pdf',
|
|
||||||
'parent' => [
|
|
||||||
'id' => $root->id,
|
|
||||||
'name' => 'root',
|
|
||||||
'items' => 2,
|
|
||||||
'trashed_items' => 2,
|
|
||||||
'type' => 'folder',
|
|
||||||
],
|
|
||||||
'shared' => null,
|
|
||||||
],
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,55 +208,11 @@ class BrowseTest extends TestCase
|
|||||||
->actingAs($user)
|
->actingAs($user)
|
||||||
->getJson('/api/browse/latest')
|
->getJson('/api/browse/latest')
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertExactJson([
|
->assertJsonFragment([
|
||||||
[
|
'id' => $file_1->id,
|
||||||
'id' => $file_2->id,
|
])
|
||||||
'user_id' => $user->id,
|
->assertJsonFragment([
|
||||||
'folder_id' => $root->id,
|
'id' => $file_2->id,
|
||||||
'thumbnail' => null,
|
|
||||||
'name' => 'Document 2',
|
|
||||||
'basename' => 'document-2.pdf',
|
|
||||||
'mimetype' => 'application/pdf',
|
|
||||||
'filesize' => $file_2->filesize,
|
|
||||||
'type' => 'file',
|
|
||||||
'metadata' => null,
|
|
||||||
'author' => 'user',
|
|
||||||
'deleted_at' => null,
|
|
||||||
'created_at' => $file_2->created_at,
|
|
||||||
'updated_at' => $file_2->updated_at->toJson(),
|
|
||||||
'file_url' => 'http://localhost/file/document-2.pdf',
|
|
||||||
'parent' => [
|
|
||||||
'id' => $root->id,
|
|
||||||
'name' => 'root',
|
|
||||||
'items' => 2,
|
|
||||||
'trashed_items' => 2,
|
|
||||||
'type' => 'folder',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'id' => $file_1->id,
|
|
||||||
'user_id' => $user->id,
|
|
||||||
'folder_id' => $root->id,
|
|
||||||
'thumbnail' => null,
|
|
||||||
'name' => 'Document 1',
|
|
||||||
'basename' => 'document-1.pdf',
|
|
||||||
'mimetype' => 'application/pdf',
|
|
||||||
'filesize' => $file_1->filesize,
|
|
||||||
'type' => 'file',
|
|
||||||
'metadata' => null,
|
|
||||||
'author' => 'user',
|
|
||||||
'deleted_at' => null,
|
|
||||||
'created_at' => $file_1->created_at,
|
|
||||||
'updated_at' => $file_1->updated_at->toJson(),
|
|
||||||
'file_url' => 'http://localhost/file/document-1.pdf',
|
|
||||||
'parent' => [
|
|
||||||
'id' => $root->id,
|
|
||||||
'name' => 'root',
|
|
||||||
'items' => 2,
|
|
||||||
'trashed_items' => 2,
|
|
||||||
'type' => 'folder',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,41 +256,11 @@ class BrowseTest extends TestCase
|
|||||||
->actingAs($user)
|
->actingAs($user)
|
||||||
->getJson('/api/browse/trash/undefined')
|
->getJson('/api/browse/trash/undefined')
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertExactJson([
|
->assertJsonFragment([
|
||||||
[
|
'id' => $folder->id,
|
||||||
'id' => $folder->id,
|
])
|
||||||
'user_id' => $user->id,
|
->assertJsonFragment([
|
||||||
'parent_id' => null,
|
'id' => $file->id,
|
||||||
'name' => 'root',
|
|
||||||
'color' => null,
|
|
||||||
'emoji' => null,
|
|
||||||
'author' => 'user',
|
|
||||||
'deleted_at' => $folder->deleted_at,
|
|
||||||
'created_at' => $folder->created_at,
|
|
||||||
'updated_at' => $folder->updated_at->toJson(),
|
|
||||||
'items' => 0,
|
|
||||||
'trashed_items' => 1,
|
|
||||||
'type' => 'folder',
|
|
||||||
'parent' => null,
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'id' => $file->id,
|
|
||||||
'user_id' => $user->id,
|
|
||||||
'folder_id' => null,
|
|
||||||
'thumbnail' => null,
|
|
||||||
'name' => 'Document',
|
|
||||||
'basename' => 'document.pdf',
|
|
||||||
'mimetype' => 'application/pdf',
|
|
||||||
'filesize' => $file->filesize,
|
|
||||||
'type' => 'file',
|
|
||||||
'metadata' => null,
|
|
||||||
'author' => 'user',
|
|
||||||
'deleted_at' => $file->deleted_at,
|
|
||||||
'created_at' => $file->created_at,
|
|
||||||
'updated_at' => $file->updated_at->toJson(),
|
|
||||||
'file_url' => 'http://localhost/file/document.pdf',
|
|
||||||
'parent' => null,
|
|
||||||
],
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,24 +284,28 @@ class BrowseTest extends TestCase
|
|||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
collect([$folder, $file])
|
Share::factory(Share::class)
|
||||||
->each(function ($item) use ($user) {
|
->create([
|
||||||
Share::factory(Share::class)
|
'type' => 'folder',
|
||||||
->create([
|
'item_id' => $folder->id,
|
||||||
'type' => $item->type === 'folder' ? 'folder' : 'file',
|
'user_id' => $user->id,
|
||||||
'item_id' => $item->id,
|
]);
|
||||||
'user_id' => $user->id,
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
collect([$folder, $file])
|
Share::factory(Share::class)
|
||||||
->each(function ($item) {
|
->create([
|
||||||
$this->getJson('/api/browse/share')
|
'type' => 'file',
|
||||||
->assertStatus(200)
|
'item_id' => $file->id,
|
||||||
->assertJsonFragment([
|
'user_id' => $user->id,
|
||||||
'id' => $item->id,
|
]);
|
||||||
]);
|
|
||||||
});
|
$this->getJson('/api/browse/share')
|
||||||
|
->assertStatus(200)
|
||||||
|
->assertJsonFragment([
|
||||||
|
'id' => $folder->id,
|
||||||
|
])
|
||||||
|
->assertJsonFragment([
|
||||||
|
'id' => $file->id,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Tests\Domain\Sharing;
|
namespace Tests\Domain\Sharing;
|
||||||
|
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
@@ -26,13 +27,13 @@ class VisitorBrowseTest extends TestCase
|
|||||||
'id' => $share->id,
|
'id' => $share->id,
|
||||||
'type' => 'shared',
|
'type' => 'shared',
|
||||||
'attributes' => [
|
'attributes' => [
|
||||||
'permission' => $share->permission,
|
'permission' => $share->permission,
|
||||||
'protected' => false,
|
'protected' => false,
|
||||||
'item_id' => $share->item_id,
|
'item_id' => $share->item_id,
|
||||||
'expire_in' => $share->expire_in,
|
'expire_in' => $share->expire_in,
|
||||||
'token' => $share->token,
|
'token' => $share->token,
|
||||||
'link' => $share->link,
|
'link' => $share->link,
|
||||||
'type' => $share->type,
|
'type' => $share->type,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
@@ -168,41 +169,6 @@ class VisitorBrowseTest extends TestCase
|
|||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$json = [
|
|
||||||
[
|
|
||||||
'id' => $folder->id,
|
|
||||||
'user_id' => $user->id,
|
|
||||||
'parent_id' => $root->id,
|
|
||||||
'name' => 'Documents',
|
|
||||||
'color' => null,
|
|
||||||
'emoji' => null,
|
|
||||||
'author' => 'user',
|
|
||||||
'deleted_at' => null,
|
|
||||||
'created_at' => $folder->created_at,
|
|
||||||
'updated_at' => $folder->updated_at->toJson(),
|
|
||||||
'items' => 0,
|
|
||||||
'trashed_items' => 0,
|
|
||||||
'type' => 'folder',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'id' => $file->id,
|
|
||||||
'user_id' => $user->id,
|
|
||||||
'folder_id' => $root->id,
|
|
||||||
'thumbnail' => null,
|
|
||||||
'name' => 'Document',
|
|
||||||
'basename' => 'document.pdf',
|
|
||||||
'mimetype' => 'application/pdf',
|
|
||||||
'filesize' => $file->filesize,
|
|
||||||
'type' => 'file',
|
|
||||||
'metadata' => null,
|
|
||||||
'author' => 'user',
|
|
||||||
'deleted_at' => null,
|
|
||||||
'created_at' => $file->created_at,
|
|
||||||
'updated_at' => $file->updated_at->toJson(),
|
|
||||||
'file_url' => "http://localhost/file/document.pdf/$share->token",
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
// Check shared item protected by password
|
// Check shared item protected by password
|
||||||
if ($is_protected) {
|
if ($is_protected) {
|
||||||
$cookie = ['share_session' => json_encode([
|
$cookie = ['share_session' => json_encode([
|
||||||
@@ -214,14 +180,24 @@ class VisitorBrowseTest extends TestCase
|
|||||||
->withUnencryptedCookies($cookie)
|
->withUnencryptedCookies($cookie)
|
||||||
->get("/api/browse/folders/$root->id/$share->token")
|
->get("/api/browse/folders/$root->id/$share->token")
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertExactJson($json);
|
->assertJsonFragment([
|
||||||
|
'id' => $file->id,
|
||||||
|
])
|
||||||
|
->assertJsonFragment([
|
||||||
|
'id' => $folder->id,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check public shared item
|
// Check public shared item
|
||||||
if (! $is_protected) {
|
if (!$is_protected) {
|
||||||
$this->getJson("/api/browse/folders/$root->id/$share->token")
|
$this->getJson("/api/browse/folders/$root->id/$share->token")
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertExactJson($json);
|
->assertJsonFragment([
|
||||||
|
'id' => $file->id,
|
||||||
|
])
|
||||||
|
->assertJsonFragment([
|
||||||
|
'id' => $folder->id,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -328,7 +304,7 @@ class VisitorBrowseTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check public shared item
|
// Check public shared item
|
||||||
if (! $is_protected) {
|
if (!$is_protected) {
|
||||||
$this->getJson("/api/browse/navigation/$share->token")
|
$this->getJson("/api/browse/navigation/$share->token")
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertExactJson($tree);
|
->assertExactJson($tree);
|
||||||
@@ -380,7 +356,7 @@ class VisitorBrowseTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check public shared item
|
// Check public shared item
|
||||||
if (! $is_protected) {
|
if (!$is_protected) {
|
||||||
$this->getJson("/api/browse/search/$share->token?query=doc")
|
$this->getJson("/api/browse/search/$share->token?query=doc")
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertJsonFragment([
|
->assertJsonFragment([
|
||||||
@@ -431,7 +407,7 @@ class VisitorBrowseTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check public shared item
|
// Check public shared item
|
||||||
if (! $is_protected) {
|
if (!$is_protected) {
|
||||||
$this->getJson("/api/browse/search/$share->token?query=doc")
|
$this->getJson("/api/browse/search/$share->token?query=doc")
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertJsonFragment([]);
|
->assertJsonFragment([]);
|
||||||
@@ -478,7 +454,7 @@ class VisitorBrowseTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check public shared item
|
// Check public shared item
|
||||||
if (! $is_protected) {
|
if (!$is_protected) {
|
||||||
$this->getJson("/api/browse/file/$share->token")
|
$this->getJson("/api/browse/file/$share->token")
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertJsonFragment([
|
->assertJsonFragment([
|
||||||
|
|||||||
Reference in New Issue
Block a user