<?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 Tests\TestCase;

class DetailTest extends TestCase
{
    use RefreshDataBase;
    /**
     * A basic feature test example.
     */
    public function test_can_see_a_safety_and_privacy_detail(): void
    {
        $safetyAndPrivacy = SafetyAndPrivacy::factory()->create();

        $user = User::factory()
            ->create();

        $response = $this->actingAs($user)->getJson("v2/safety_and_privacy/{$safetyAndPrivacy->id}");

        $response->assertStatus(200)
            ->assertJsonStructure([
                'id',
                'lat',
                'lon',
                'province_id',
                'province_fa',
                'city_id',
                'city_fa',
                'edare_shahri_id',
                'edare_shahri_name',
                'recognize_picture',
                'activity_date_time',
                'judiciary_document',
                'judiciary_document_upload_date',
                'action_picture',
                'info_id',
                'info_fa',
                'way_id'
            ]);
    }
}
