Fixed: Tests for refresh intervals

pull/365/head
Qstick 7 years ago
parent d79139976c
commit 2969decf95

@ -33,7 +33,7 @@ namespace NzbDrone.Core.Test.MusicTests
private void GivenAlbumLastRefreshedRecently() private void GivenAlbumLastRefreshedRecently()
{ {
_album.LastInfoSync = DateTime.UtcNow.AddHours(-1); _album.LastInfoSync = DateTime.UtcNow.AddHours(-7);
} }
private void GivenRecentlyReleased() private void GivenRecentlyReleased()
@ -47,7 +47,7 @@ namespace NzbDrone.Core.Test.MusicTests
} }
[Test] [Test]
public void should_return_false_if_album_last_refreshed_less_than_6_hours_ago() public void should_return_false_if_album_last_refreshed_less_than_12_hours_ago()
{ {
GivenAlbumLastRefreshedRecently(); GivenAlbumLastRefreshedRecently();

@ -44,14 +44,14 @@ namespace NzbDrone.Core.Test.MusicTests
_artist.LastInfoSync = DateTime.UtcNow.AddDays(-1); _artist.LastInfoSync = DateTime.UtcNow.AddDays(-1);
} }
private void GivenArtistLastRefreshedHalfADayAgo() private void GivenArtistLastRefreshedThreeDaysAgo()
{ {
_artist.LastInfoSync = DateTime.UtcNow.AddHours(-12); _artist.LastInfoSync = DateTime.UtcNow.AddDays(-3);
} }
private void GivenArtistLastRefreshedRecently() private void GivenArtistLastRefreshedRecently()
{ {
_artist.LastInfoSync = DateTime.UtcNow.AddHours(-1); _artist.LastInfoSync = DateTime.UtcNow.AddHours(-7);
} }
private void GivenRecentlyAired() private void GivenRecentlyAired()
@ -68,15 +68,15 @@ namespace NzbDrone.Core.Test.MusicTests
} }
[Test] [Test]
public void should_return_true_if_running_artist_last_refreshed_more_than_6_hours_ago() public void should_return_true_if_running_artist_last_refreshed_more_than_24_hours_ago()
{ {
GivenArtistLastRefreshedHalfADayAgo(); GivenArtistLastRefreshedThreeDaysAgo();
Subject.ShouldRefresh(_artist).Should().BeTrue(); Subject.ShouldRefresh(_artist).Should().BeTrue();
} }
[Test] [Test]
public void should_return_false_if_running_artist_last_refreshed_less_than_6_hours_ago() public void should_return_false_if_running_artist_last_refreshed_less_than_12_hours_ago()
{ {
GivenArtistLastRefreshedRecently(); GivenArtistLastRefreshedRecently();

Loading…
Cancel
Save