mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
team folder browsing with static team folder details
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Domain\Browsing;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
namespace Tests\Domain\Sharing;
|
||||
|
||||
use Domain\Sharing\Notifications\SharedSendViaEmail;
|
||||
use Tests\TestCase;
|
||||
use App\Users\Models\User;
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
use Domain\Files\Models\File;
|
||||
use Domain\Folders\Models\Folder;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Domain\Sharing\Notifications\SharedSendViaEmail;
|
||||
|
||||
class UserShareTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ class VisitorBrowseTest extends TestCase
|
||||
'type' => 'shared',
|
||||
'attributes' => [
|
||||
'permission' => $share->permission,
|
||||
'protected' => false,
|
||||
'protected' => false,
|
||||
'item_id' => $share->item_id,
|
||||
'expire_in' => $share->expire_in,
|
||||
'token' => $share->token,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Domain\Teams;
|
||||
|
||||
use Notification;
|
||||
@@ -13,6 +12,31 @@ use Domain\Teams\Notifications\InvitationIntoTeamFolder;
|
||||
|
||||
class TeamsTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function it_find_team_folder_id_from_children()
|
||||
{
|
||||
$teamFolder = Folder::factory()
|
||||
->create([
|
||||
'team_folder' => 1,
|
||||
]);
|
||||
|
||||
$level_1 = Folder::factory()
|
||||
->create([
|
||||
'parent_id' => $teamFolder->id,
|
||||
]);
|
||||
|
||||
$level_2 = Folder::factory()
|
||||
->create([
|
||||
'parent_id' => $level_1->id,
|
||||
]);
|
||||
|
||||
$teamRoot = recursiveFind($level_2->teamRoot->toArray(), 'id');
|
||||
|
||||
$this->assertEquals($teamFolder->id, end($teamRoot));
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user