From edf06dda3eb856c78043f9ab1c4f692b018b4c33 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 31 Dec 2012 12:25:15 -0800 Subject: [PATCH] Added test for season search --- NzbDrone.Core.Test/JobTests/SeasonSearchJobTest.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NzbDrone.Core.Test/JobTests/SeasonSearchJobTest.cs b/NzbDrone.Core.Test/JobTests/SeasonSearchJobTest.cs index 208f4f441..0f1bff47e 100644 --- a/NzbDrone.Core.Test/JobTests/SeasonSearchJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/SeasonSearchJobTest.cs @@ -122,5 +122,16 @@ namespace NzbDrone.Core.Test.JobTests ExceptionVerification.ExpectedWarns(1); } + + [Test] + public void should_search_for_individual_episodes_when_no_partial_results_are_returned() + { + Mocker.GetMock() + .Setup(c => c.PartialSeasonSearch(notification, 1, 1)).Returns(new List()); + + Mocker.Resolve().Start(notification, new { SeriesId = 1, SeasonNumber = 1 }); + + Mocker.GetMock().Verify(v => v.Start(notification, It.Is(o => o.GetPropertyValue("EpisodeId") > 0)), Times.Exactly(_episodes.Count)); + } } } \ No newline at end of file