Fixed broken EpisodeProvider tests.

pull/3113/head
Mark McDowall 14 years ago
parent f02e92b005
commit 8cffa5168b

@ -352,8 +352,8 @@ namespace NzbDrone.Core.Test
mocker.Resolve<EpisodeProvider>().RefreshEpisodeInfo(fakeSeries);
//Assert
mocker.GetMock<IDatabase>().Verify(c => c.Insert(It.IsAny<Object>()), Times.Exactly(tvdbSeries.Episodes.Count));
mocker.GetMock<IDatabase>().Verify(c => c.Update(It.IsAny<Object>()), Times.Never());
mocker.GetMock<IDatabase>().Verify(c => c.InsertMany(It.Is<IEnumerable<Episode>>(l => l.Count() == 5)), Times.Once());
mocker.GetMock<IDatabase>().Verify(c => c.Update(It.IsAny<IEnumerable<Episode>>()), Times.Never());
mocker.VerifyAllMocks();
}
@ -423,7 +423,7 @@ namespace NzbDrone.Core.Test
//Assert
mocker.VerifyAllMocks();
mocker.GetMock<IDatabase>().Verify(c => c.Update(fakeEpisodeList[0]), Times.Once());
mocker.GetMock<IDatabase>().Verify(c => c.UpdateMany(fakeEpisodeList), Times.Once());
}
[Test]
@ -467,7 +467,7 @@ namespace NzbDrone.Core.Test
//Assert
mocker.VerifyAllMocks();
mocker.GetMock<IDatabase>().Verify(c => c.Update(localEpisode), Times.Once());
mocker.GetMock<IDatabase>().Verify(c => c.UpdateMany(new List<Episode>{localEpisode}), Times.Once());
}
[Test]

@ -38,7 +38,7 @@ Missing
.Width(80);
columns.Bound(c => c.EpisodeId)
.Title("Actions")
.ClientTemplate("<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onClick=\"searchForEpisode('<#= EpisodeId #>'); return false;\"><img src='../../Content/Images/Search.png' alt='Search' title='Search for Episode' class='searchImage' /></a>")
.ClientTemplate("<a href=\"../Episode/Season?episodeId=<#= EpisodeId #>\" onClick=\"searchForEpisode(<#= EpisodeId #>); return false;\"><img src='../../Content/Images/Search.png' alt='Search' title='Search for Episode' class='searchImage' /></a>")
.Width("40");
})
.DetailView(detailView => detailView.ClientTemplate(

Loading…
Cancel
Save