mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-03 02:13:31 +00:00
23 lines
723 B
C#
23 lines
723 B
C#
|
|
using Data.SeaHavenIndustries;
|
||
|
|
using Microsoft.EntityFrameworkCore;
|
||
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
|
|
||
|
|
namespace SeaHavenIndustries.Tests;
|
||
|
|
|
||
|
|
public class WorkOrderMigrationDiscoveryTests
|
||
|
|
{
|
||
|
|
[Fact]
|
||
|
|
public void Phase7_ExternalWorkOrderIdUnique_is_discoverable_by_ef_runtime()
|
||
|
|
{
|
||
|
|
var options = new DbContextOptionsBuilder<ApplicationDbContext>()
|
||
|
|
.UseSqlite("DataSource=:memory:")
|
||
|
|
.Options;
|
||
|
|
|
||
|
|
using var context = new ApplicationDbContext(options);
|
||
|
|
var migrations = context.Database.GetMigrations().ToList();
|
||
|
|
|
||
|
|
Assert.Contains("20260713120000_Phase7_ExternalWorkOrderIdUnique", migrations);
|
||
|
|
}
|
||
|
|
}
|