mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-10-08 06:05:02 -04:00
20 lines
642 B
C#
20 lines
642 B
C#
using allstarr.Core.Storage;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace allstarr.Tests;
|
|
|
|
public sealed class MigrationModelSnapshotTests
|
|
{
|
|
[Fact]
|
|
public void CheckedInSnapshotMatchesTheRuntimeModel()
|
|
{
|
|
var options = new DbContextOptionsBuilder<AllstarrDbContext>()
|
|
.UseNpgsql("Host=unused;Database=unused;Username=unused;Password=unused")
|
|
.Options;
|
|
using var context = new AllstarrDbContext(options);
|
|
|
|
Assert.False(context.Database.HasPendingModelChanges());
|
|
Assert.Equal("20260804080000_BackfillV3CompatibilityState", context.Database.GetMigrations().Last());
|
|
}
|
|
}
|