1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-25 17:27:18 +00:00

Fixed broken EpisodeProvider tests.

This commit is contained in:
Mark McDowall 2011-08-31 16:56:25 -07:00
parent f02e92b005
commit 8cffa5168b
2 changed files with 5 additions and 5 deletions

View file

@ -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]

View file

@ -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(