|
|
|
@ -18,7 +18,6 @@ namespace NzbDrone.Core.Test.TvTests
|
|
|
|
|
{
|
|
|
|
|
_series = Builder<Series>.CreateNew()
|
|
|
|
|
.With(v => v.Status == SeriesStatusType.Continuing)
|
|
|
|
|
.With(v => v.LastInfoSync == DateTime.UtcNow.AddHours(-12))
|
|
|
|
|
.Build();
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IEpisodeService>()
|
|
|
|
@ -45,6 +44,11 @@ namespace NzbDrone.Core.Test.TvTests
|
|
|
|
|
_series.LastInfoSync = DateTime.UtcNow.AddDays(-1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void GivenSeriesLastRefreshedHalfADayAgo()
|
|
|
|
|
{
|
|
|
|
|
_series.LastInfoSync = DateTime.UtcNow.AddHours(-12);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void GivenSeriesLastRefreshedRecently()
|
|
|
|
|
{
|
|
|
|
|
_series.LastInfoSync = DateTime.UtcNow.AddHours(-1);
|
|
|
|
@ -66,6 +70,8 @@ namespace NzbDrone.Core.Test.TvTests
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_return_true_if_running_series_last_refreshed_more_than_6_hours_ago()
|
|
|
|
|
{
|
|
|
|
|
GivenSeriesLastRefreshedHalfADayAgo();
|
|
|
|
|
|
|
|
|
|
Subject.ShouldRefresh(_series).Should().BeTrue();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|