write test for safety and privacy controller
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\V2\Dashboard\SafetyAndPrivacy;
|
||||
|
||||
use App\Models\LogList;
|
||||
use App\Models\Permission;
|
||||
use App\Models\SafetyAndPrivacy;
|
||||
use App\Models\User;
|
||||
use App\Models\UserActivityLog;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Tests\TestCase;
|
||||
|
||||
class getAllDataToMapTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase, WithFaker;
|
||||
/**
|
||||
* A basic feature test example.
|
||||
*/
|
||||
public function test_can_see_all_data_to_map(): void
|
||||
{
|
||||
$date_from = $this->faker->date;
|
||||
$date_to = $this->faker->date;
|
||||
|
||||
$user = User::factory()
|
||||
->create();
|
||||
|
||||
$response = $this->actingAs($user)->getJson(route('v2.safety_and_privacy.report.map', [
|
||||
'date_from' => $date_from,
|
||||
'date_to' => $date_to
|
||||
]));
|
||||
|
||||
$response->assertStatus(200)
|
||||
->assertJsonStructure([
|
||||
'status',
|
||||
'count',
|
||||
'message',
|
||||
'data'
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user