mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
rebase
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testBasicTest()
|
||||
{
|
||||
$response = $this->get('/');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
}
|
||||
59
tests/Unit/BulkdTest.php
Normal file
59
tests/Unit/BulkdTest.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use App\User;
|
||||
// use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Tests\TestCase;
|
||||
use App\FileManagerFile;
|
||||
use Laravel\Passport\Passport;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class BulkTest extends TestCase
|
||||
{
|
||||
// use DatabaseMigrations;
|
||||
use RefreshDatabase;
|
||||
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
|
||||
public function bulk_delete_user ()
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
|
||||
$data ='{
|
||||
"data": [
|
||||
{
|
||||
"force_delete": false,
|
||||
"type": "file",
|
||||
"unique_id": 0
|
||||
},
|
||||
{
|
||||
"force_delete": false,
|
||||
"type": "file",
|
||||
"unique_id": 1
|
||||
},
|
||||
{
|
||||
"force_delete": false,
|
||||
"type": "file",
|
||||
"unique_id": 2
|
||||
}
|
||||
]
|
||||
}';
|
||||
|
||||
$user = factory(User::class)->create();
|
||||
|
||||
factory(FileManagerFile::class, 3)->create();
|
||||
|
||||
$this->assertDatabaseCount('file_manager_files', 3);
|
||||
|
||||
$this->actingAs($user)->withoutMiddleware()->json('POST','/api/remove-item', json_decode($data , true))
|
||||
->assertStatus(201);
|
||||
|
||||
// $this->assertDatabaseCount('file_manager_files', 3);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testBasicTest()
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user