20 lines
406 B
PHP
20 lines
406 B
PHP
|
<?php
|
||
|
|
||
|
namespace Tests\Feature;
|
||
|
|
||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||
|
use Tests\TestCase;
|
||
|
|
||
|
class ProductsTest extends TestCase
|
||
|
{
|
||
|
use RefreshDatabase;
|
||
|
|
||
|
public function testGetProducts()
|
||
|
{
|
||
|
$response = $this->get('http://localhost:8000/api/product');
|
||
|
|
||
|
$response->assertStatus(200);
|
||
|
$response->assertJsonStructure(['success', 'data' => ['products']]);
|
||
|
}
|
||
|
}
|