diff options
Diffstat (limited to 'tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs')
| -rw-r--r-- | tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs index e6ccae183..78e431be1 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/EfMigrations/EfMigrationTests.cs @@ -1,5 +1,6 @@ using System; using System.Threading.Tasks; +using Jellyfin.Database.Providers.PgSql; using Jellyfin.Server.Implementations.Migrations; using Microsoft.EntityFrameworkCore; using Xunit; @@ -9,10 +10,18 @@ namespace Jellyfin.Server.Implementations.Tests.EfMigrations; public class EfMigrationTests { [Fact] - public void CheckForUnappliedMigrations() + public void CheckForUnappliedMigrations_PgSQL() { - var dbDesignContext = new DesignTimeJellyfinDbFactory(); + var dbDesignContext = new PgSqlDesignTimeJellyfinDbFactory(); var context = dbDesignContext.CreateDbContext([]); - Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model. Please create a Migration."); + Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EFCore model for PgSQL. Please create a Migration."); + } + + [Fact] + public void CheckForUnappliedMigrations_SqLite() + { + var dbDesignContext = new SqliteDesignTimeJellyfinDbFactory(); + var context = dbDesignContext.CreateDbContext([]); + Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EFCore model for SQLite. Please create a Migration."); } } |
