1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-10 11:10:40 +02: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 @@ public void new_episodes_only_calls_Insert()
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 @@ public void should_try_to_get_existing_episode_using_tvdbid_first()
//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 @@ public void should_try_to_get_existing_episode_using_tvdbid_first_then_season_ep
//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(