package com.ruoyi.ccdi.project.sql;

import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

import static org.junit.jupiter.api.Assertions.assertTrue;

class CcdiProjectStatusSqlTest {

    @Test
    void shouldContainTaggingStatusInInitAndMigrationSql() throws IOException {
        Path repoRoot = Path.of("..");
        String initSql = Files.readString(repoRoot.resolve("sql/ccdi_project.sql"));
        String migrationSql = Files.readString(repoRoot.resolve("sql/migration/2026-03-18-add-project-tagging-status.sql"));

        assertTrue(initSql.contains("打标中"));
        assertTrue(initSql.contains("'3'"));
        assertTrue(migrationSql.contains("ccdi_project_status"));
        assertTrue(migrationSql.contains("打标中"));
        assertTrue(migrationSql.contains("'3'"));
    }
}
