mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-03 05:34:16 -04:00
Added Unittest to check for unapplied model changes (#12854)
This commit is contained in:
parent
5b696124fc
commit
88fb668cc5
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Jellyfin.Server.Implementations.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Jellyfin.Server.Implementations.Tests.EfMigrations;
|
||||||
|
|
||||||
|
public class EfMigrationTests
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public void CheckForUnappliedMigrations()
|
||||||
|
{
|
||||||
|
var dbDesignContext = new DesignTimeJellyfinDbFactory();
|
||||||
|
var context = dbDesignContext.CreateDbContext([]);
|
||||||
|
Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model. Please create a Migration.");
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user