Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/commit/63a2664d8a2016fe76a342ea0848bb6bda7fd3c8
You should set ROOT_URL correctly, otherwise the web may not work correctly.
1 changed files with
33 additions and
3 deletions
@ -29,7 +29,6 @@ namespace NzbDrone.Core.Test
db . InsertMany ( historyItem ) ;
//Act
var result = mocker . Resolve < HistoryProvider > ( ) . AllItems ( ) ;
@ -37,6 +36,39 @@ namespace NzbDrone.Core.Test
result . Should ( ) . HaveSameCount ( historyItem ) ;
}
[Test]
public void AllItemsWithRelationships ( )
{
//Setup
var seriesOne = Builder < Series > . CreateNew ( ) . With ( s = > s . SeriesId = 12345 ) . Build ( ) ;
var seriesTwo = Builder < Series > . CreateNew ( ) . With ( s = > s . SeriesId = 54321 ) . Build ( ) ;
var episodes = Builder < Episode > . CreateListOfSize ( 10 ) . Build ( ) ;
var historyItems = Builder < History > . CreateListOfSize ( 10 ) . WhereTheFirst ( 5 ) . Have ( h = > h . SeriesId = seriesOne . SeriesId ) . WhereTheLast ( 5 ) . Have ( h = > h . SeriesId = seriesTwo . SeriesId ) . Build ( ) ;
var mocker = new AutoMoqer ( ) ;
var db = MockLib . GetEmptyDatabase ( ) ;
mocker . SetConstant ( db ) ;
db . InsertMany ( historyItems ) ;
db . InsertMany ( episodes ) ;
db . Insert ( seriesOne ) ;
db . Insert ( seriesTwo ) ;
//Act
var result = mocker . Resolve < HistoryProvider > ( ) . AllItemsWithRelationships ( ) ;
//Assert
result . Should ( ) . HaveSameCount ( historyItems ) ;
foreach ( var history in result )
{
Assert . NotNull ( history . Episode ) ;
Assert . That ( ! String . IsNullOrEmpty ( history . SeriesTitle ) ) ;
}
}
[Test]
public void PurgeItem ( )
{
@ -157,7 +189,5 @@ namespace NzbDrone.Core.Test
Assert . AreEqual ( history . Quality , storedHistory . First ( ) . Quality ) ;
Assert . AreEqual ( history . IsProper , storedHistory . First ( ) . IsProper ) ;
}
}
}