Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Radarr/commit/69406a95d44b74cd361fc56315a0d606f471a2ef
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
37 additions and
1 deletions
@ -166,6 +166,40 @@ namespace NzbDrone.Core.Test
Assert . IsNull ( result ) ;
}
[Test]
[Description("Verifies that a un-parsable file isn't imported")]
public void import_unparsable_file ( )
{
//Arrange
/////////////////////////////////////////
//Constants
const string fileName = @"WEEDS.avi" ;
const int size = 12345 ;
//Fakes
var fakeSeries = Builder < Series > . CreateNew ( ) . Build ( ) ;
//Mocks
var mocker = new AutoMoqer ( ) ;
mocker . GetMock < IRepository > ( MockBehavior . Strict )
. Setup ( r = > r . Exists ( It . IsAny < Expression < Func < EpisodeFile , Boolean > > > ( ) ) ) . Returns ( false ) . Verifiable ( ) ;
mocker . GetMock < DiskProvider > ( )
. Setup ( e = > e . GetSize ( fileName ) ) . Returns ( size ) . Verifiable ( ) ;
//Act
var result = mocker . Resolve < MediaFileProvider > ( ) . ImportFile ( fakeSeries , fileName ) ;
//Assert
mocker . VerifyAllMocks ( ) ;
Assert . IsNull ( result ) ;
ExceptionVerification . ExcpectedWarns ( 1 ) ;
}
[Test]
[Description("Verifies that a new file imported properly")]
public void import_sample_file ( )
@ -72,11 +72,13 @@ namespace NzbDrone.Core.Providers
if ( ! _repository . Exists < EpisodeFile > ( e = > e . Path = = Parser . NormalizePath ( filePath ) ) )
{
var parseResult = Parser . ParseEpisodeInfo ( filePath ) ;
parseResult . CleanTitle = series . Title ; //replaces the nasty path as title to help with logging
if ( parseResult = = null )
return null ;
parseResult . CleanTitle = series . Title ; //replaces the nasty path as title to help with logging
//Stores the list of episodes to add to the EpisodeFile
var episodes = new List < Episode > ( ) ;