team folder browsing with static team folder details

This commit is contained in:
Peter Papp
2021-08-31 14:08:47 +02:00
parent f44e262d6e
commit a3516769de
46 changed files with 317 additions and 225 deletions

View File

@@ -1,5 +1,4 @@
<?php
namespace Tests\Domain\Browsing;
use Tests\TestCase;

View File

@@ -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
{

View File

@@ -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,

View File

@@ -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
*/