mirror of https://github.com/Radarr/Radarr
Fixed broken EpisodeProvider tests.
This commit is contained in:
parent
f02e92b005
commit
8cffa5168b
|
@ -352,8 +352,8 @@ namespace NzbDrone.Core.Test
|
||||||
mocker.Resolve<EpisodeProvider>().RefreshEpisodeInfo(fakeSeries);
|
mocker.Resolve<EpisodeProvider>().RefreshEpisodeInfo(fakeSeries);
|
||||||
|
|
||||||
//Assert
|
//Assert
|
||||||
mocker.GetMock<IDatabase>().Verify(c => c.Insert(It.IsAny<Object>()), Times.Exactly(tvdbSeries.Episodes.Count));
|
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<Object>()), Times.Never());
|
mocker.GetMock<IDatabase>().Verify(c => c.Update(It.IsAny<IEnumerable<Episode>>()), Times.Never());
|
||||||
|
|
||||||
mocker.VerifyAllMocks();
|
mocker.VerifyAllMocks();
|
||||||
}
|
}
|
||||||
|
@ -423,7 +423,7 @@ namespace NzbDrone.Core.Test
|
||||||
|
|
||||||
//Assert
|
//Assert
|
||||||
mocker.VerifyAllMocks();
|
mocker.VerifyAllMocks();
|
||||||
mocker.GetMock<IDatabase>().Verify(c => c.Update(fakeEpisodeList[0]), Times.Once());
|
mocker.GetMock<IDatabase>().Verify(c => c.UpdateMany(fakeEpisodeList), Times.Once());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -467,7 +467,7 @@ namespace NzbDrone.Core.Test
|
||||||
|
|
||||||
//Assert
|
//Assert
|
||||||
mocker.VerifyAllMocks();
|
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]
|
[Test]
|
||||||
|
|
|
@ -38,7 +38,7 @@ Missing
|
||||||
.Width(80);
|
.Width(80);
|
||||||
columns.Bound(c => c.EpisodeId)
|
columns.Bound(c => c.EpisodeId)
|
||||||
.Title("Actions")
|
.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");
|
.Width("40");
|
||||||
})
|
})
|
||||||
.DetailView(detailView => detailView.ClientTemplate(
|
.DetailView(detailView => detailView.ClientTemplate(
|
||||||
|
|
Loading…
Reference in New Issue