mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-29 03:10:51 +00:00
added guest_get_file_detail test
This commit is contained in:
@@ -744,4 +744,31 @@ class ShareEditorTest extends TestCase
|
|||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertJsonFragment([]);
|
->assertJsonFragment([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function guest_get_file_detail()
|
||||||
|
{
|
||||||
|
$file = File::factory(File::class)
|
||||||
|
->create([
|
||||||
|
'name' => 'Document',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$share = Share::factory(Share::class)
|
||||||
|
->create([
|
||||||
|
'item_id' => $file->id,
|
||||||
|
'user_id' => $file->user_id,
|
||||||
|
'type' => 'file',
|
||||||
|
'is_protected' => false,
|
||||||
|
'permission' => 'editor',
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
$this->getJson("/api/browse/files/$share->token/public")
|
||||||
|
->assertStatus(200)
|
||||||
|
->assertJsonFragment([
|
||||||
|
'name' => 'Document'
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user