mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
deleted pro code
This commit is contained in:
@@ -72,69 +72,4 @@ class SearchTest extends TestCase
|
||||
'id' => $folder->id,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function it_get_searched_shared_with_me_file_and_folders()
|
||||
{
|
||||
$owner = User::factory()
|
||||
->hasSettings()
|
||||
->create();
|
||||
|
||||
$member = User::factory()
|
||||
->hasSettings()
|
||||
->create();
|
||||
|
||||
$folder = Folder::factory()
|
||||
->create([
|
||||
'name' => "Alice's files",
|
||||
'user_id' => $owner->id,
|
||||
]);
|
||||
|
||||
$folderWithin = Folder::factory()
|
||||
->create([
|
||||
'name' => 'Folder within Alice',
|
||||
'parent_id' => $folder->id,
|
||||
'user_id' => $owner->id,
|
||||
]);
|
||||
|
||||
$document = File::factory()
|
||||
->create([
|
||||
'name' => 'Document',
|
||||
'user_id' => $owner->id,
|
||||
'parent_id' => $folderWithin->id,
|
||||
]);
|
||||
|
||||
DB::table('team_folder_members')
|
||||
->insert([
|
||||
'parent_id' => $folder->id,
|
||||
'user_id' => $member->id,
|
||||
'permission' => 'can-edit',
|
||||
]);
|
||||
|
||||
$this
|
||||
->actingAs($member)
|
||||
->getJson('/api/browse/search?query=ali')
|
||||
->assertStatus(200)
|
||||
->assertJsonFragment([
|
||||
'id' => $folder->id,
|
||||
]);
|
||||
|
||||
$this
|
||||
->actingAs($member)
|
||||
->getJson('/api/browse/search?query=Fol')
|
||||
->assertStatus(200)
|
||||
->assertJsonFragment([
|
||||
'id' => $folder->id,
|
||||
]);
|
||||
|
||||
$this
|
||||
->actingAs($member)
|
||||
->getJson('/api/browse/search?query=doc')
|
||||
->assertStatus(200)
|
||||
->assertJsonFragment([
|
||||
'id' => $document->id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user