mirror of
https://github.com/Radarr/Radarr
synced 2024-12-25 01:11:43 +00:00
left over test.
This commit is contained in:
parent
0794affae0
commit
b8827096b9
1 changed files with 0 additions and 32 deletions
|
@ -33,37 +33,5 @@ public void get_files_by_series()
|
|||
seriesFiles.Should().OnlyContain(c => c.SeriesId == 12);
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void GetFileByPath_should_return_null_if_file_does_not_exist_in_database()
|
||||
{
|
||||
Subject.GetFileByPath(@"C:\Test\EpisodeFile.avi").Should().BeNull();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void exists_should_return_false_if_file_doesnt_exist()
|
||||
{
|
||||
Subject.Exists(@"C:\Test\EpisodeFile.avi").Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetFileByPath_should_return_EpisodeFile_if_file_exists_in_database()
|
||||
{
|
||||
var path = @"C:\Test\EpisodeFile.avi".AsOsAgnostic();
|
||||
|
||||
var episodeFile = Builder<EpisodeFile>.CreateNew()
|
||||
.With(f => f.Id = 0)
|
||||
.With(f => f.Path = path.CleanFilePath())
|
||||
.Build();
|
||||
|
||||
Subject.Insert(episodeFile);
|
||||
|
||||
var file = Subject.GetFileByPath(path);
|
||||
|
||||
//Resolve
|
||||
file.Should().NotBeNull();
|
||||
file.Path.Should().Be(path.CleanFilePath());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue