mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
- Invoice listing in frontend
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
namespace Tests\Feature\Oasis;
|
||||
|
||||
use App\Models\Oasis\Client;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
use Tests\TestCase;
|
||||
|
||||
class OasisClientTest extends TestCase
|
||||
@@ -22,4 +24,26 @@ class OasisClientTest extends TestCase
|
||||
'name' => $client->name,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function it_get_all_clients()
|
||||
{
|
||||
$user = User::factory(User::class)
|
||||
->create(['role' => 'user']);
|
||||
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$client = Client::factory(Client::class)
|
||||
->create([
|
||||
'user_id' => $user->id,
|
||||
]);
|
||||
|
||||
$this->getJson('/api/oasis/clients')
|
||||
->assertJsonFragment([
|
||||
'id' => $client->id,
|
||||
'user_id' => $user->id,
|
||||
])->assertStatus(200);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user