|
|
@ -144,5 +144,60 @@ namespace NzbDrone.Core.Test.Datastore.Migration
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.Resolve<SeriesRepository>().Get(1).Tags.First().Should().Be(1);
|
|
|
|
Mocker.Resolve<SeriesRepository>().Get(1).Tags.First().Should().Be(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
|
|
|
public void should_only_update_affected_series()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
WithTestDb(c =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
c.Insert.IntoTable("Series").Row(new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Tvdbid = 1,
|
|
|
|
|
|
|
|
TvRageId = 1,
|
|
|
|
|
|
|
|
Title = "Title1",
|
|
|
|
|
|
|
|
CleanTitle = "CleanTitle1",
|
|
|
|
|
|
|
|
Status = 1,
|
|
|
|
|
|
|
|
Images = "",
|
|
|
|
|
|
|
|
Path = "c:\\test",
|
|
|
|
|
|
|
|
Monitored = 1,
|
|
|
|
|
|
|
|
SeasonFolder = 1,
|
|
|
|
|
|
|
|
Runtime = 0,
|
|
|
|
|
|
|
|
SeriesType = 0,
|
|
|
|
|
|
|
|
UseSceneNumbering = 0,
|
|
|
|
|
|
|
|
LastInfoSync = "2000-01-01 00:00:00",
|
|
|
|
|
|
|
|
Tags = "[2]"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
c.Insert.IntoTable("Series").Row(new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Tvdbid = 2,
|
|
|
|
|
|
|
|
TvRageId = 2,
|
|
|
|
|
|
|
|
Title = "Title2",
|
|
|
|
|
|
|
|
CleanTitle = "CleanTitle2",
|
|
|
|
|
|
|
|
Status = 1,
|
|
|
|
|
|
|
|
Images = "",
|
|
|
|
|
|
|
|
Path = "c:\\test",
|
|
|
|
|
|
|
|
Monitored = 1,
|
|
|
|
|
|
|
|
SeasonFolder = 1,
|
|
|
|
|
|
|
|
Runtime = 0,
|
|
|
|
|
|
|
|
SeriesType = 0,
|
|
|
|
|
|
|
|
UseSceneNumbering = 0,
|
|
|
|
|
|
|
|
LastInfoSync = "2000-01-01 00:00:00",
|
|
|
|
|
|
|
|
Tags = "[]"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
c.Insert.IntoTable("Tags").Row(new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Label = "test"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
c.Insert.IntoTable("Tags").Row(new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Label = "test"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.Resolve<SeriesRepository>().Get(2).Tags.Should().BeEmpty();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|