mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 09:49:00 +00:00
Another path test fix
This commit is contained in:
parent
e610b74745
commit
92a0305740
1 changed files with 19 additions and 1 deletions
|
@ -316,11 +316,29 @@ public void should_use_folder_info_original_title_to_find_relative_path()
|
|||
}
|
||||
|
||||
[Test]
|
||||
public void should_get_relative_path_when_there_is_no_grandparent()
|
||||
public void should_get_relative_path_when_there_is_no_grandparent_windows()
|
||||
{
|
||||
WindowsOnly();
|
||||
|
||||
var name = "Transformers.2007.720p.BluRay.x264-Radarr";
|
||||
var outputPath = @"C:\".AsOsAgnostic();
|
||||
var localMovie = _approvedDecisions.First().LocalMovie;
|
||||
localMovie.FolderMovieInfo = new ParsedMovieInfo { ReleaseTitle = name };
|
||||
localMovie.Path = Path.Combine(outputPath, name + ".mkv");
|
||||
|
||||
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true, null);
|
||||
|
||||
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<MovieFile>(c => c.OriginalFilePath == $"{name}.mkv".AsOsAgnostic())));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_get_relative_path_when_there_is_no_grandparent_mono()
|
||||
{
|
||||
MonoOnly();
|
||||
|
||||
var name = "Transformers.2007.720p.BluRay.x264-Radarr";
|
||||
var outputPath = "/";
|
||||
var localMovie = _approvedDecisions.First().LocalMovie;
|
||||
|
||||
localMovie.FolderMovieInfo = new ParsedMovieInfo { ReleaseTitle = name };
|
||||
localMovie.Path = Path.Combine(outputPath, name + ".mkv");
|
||||
|
|
Loading…
Reference in a new issue