Fixed some tests.

This commit is contained in:
Taloth Saldono
2015-05-04 01:30:16 +02:00
parent 2a83088045
commit c08d8252ff
4 changed files with 35 additions and 10 deletions
@@ -11,20 +11,13 @@ namespace NzbDrone.Core.Test.Framework
{
protected override TestDatabase WithTestDb(Action<MigrationBase> beforeMigration)
{
var factory = Mocker.Resolve<DbFactory>();
var database = factory.Create(MigrationType, m =>
return base.WithTestDb(m =>
{
if (m.GetType() == typeof(TMigration))
{
beforeMigration(m);
}
});
var testDb = new TestDatabase(database);
Mocker.SetConstant(database);
return testDb;
}
[SetUp]