<?php

namespace Tests\Feature;

use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

class AdminJsToastCopyFailedHelperShouldExistTest extends TestCase
{
    use RefreshDatabase;

    public function test_admin_js_should_include_toast_copy_failed_helper(): void
    {
        $js = file_get_contents(public_path('js/admin.js'));
        $this->assertIsString($js);

        $this->assertStringContainsString('function toastCopyFailed', $js);
        $this->assertStringContainsString("msg = '复制失败'", $js);
        $this->assertStringContainsString("return toastError(msg)", $js);
    }
}
