mirror of
https://github.com/filegator/filegator.git
synced 2025-08-23 02:03:38 +02:00
initial commit
This commit is contained in:
62
tests/backend/Feature/FeatureTest.php
Normal file
62
tests/backend/Feature/FeatureTest.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the FileGator package.
|
||||
*
|
||||
* (c) Milos Stojanovic <alcalbg@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE file
|
||||
*/
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
class FeatureTest extends TestCase
|
||||
{
|
||||
public function testHome()
|
||||
{
|
||||
$this->sendRequest('GET', '/');
|
||||
|
||||
$this->assertOk();
|
||||
}
|
||||
|
||||
public function testMethodNotAllowed()
|
||||
{
|
||||
$this->sendRequest('DELETE', '/');
|
||||
|
||||
$this->assertStatus(401);
|
||||
}
|
||||
|
||||
public function testNotFoundPage()
|
||||
{
|
||||
$this->sendRequest('GET', '/fakeroute');
|
||||
|
||||
$this->assertStatus(404);
|
||||
}
|
||||
|
||||
public function testUnprocessableRequest()
|
||||
{
|
||||
$this->sendRequest('POST', '/login', 'dddddd');
|
||||
|
||||
$this->assertUnprocessable();
|
||||
}
|
||||
|
||||
public function testGetFrontendConfig()
|
||||
{
|
||||
$this->sendRequest('GET', '/getconfig');
|
||||
|
||||
$this->assertOk();
|
||||
$this->assertResponseJsonHas([
|
||||
'data' => [
|
||||
'app_name' => 'FileGator',
|
||||
'upload_max_size' => 2 * 1024 * 1024,
|
||||
'upload_chunk_size' => 1 * 1024 * 1024,
|
||||
'upload_simultaneous' => 3,
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user