mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 14:37:07 -04:00
Fix media covers test
This commit is contained in:
parent
c281e68b9f
commit
49b0c9639c
1 changed files with 5 additions and 6 deletions
|
@ -41,16 +41,15 @@ namespace NzbDrone.Core.Test.MediaCoverTests
|
|||
new MediaCover.MediaCover { CoverType = MediaCoverTypes.Banner }
|
||||
};
|
||||
|
||||
var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "Files", "Media", "H264_sample.mp4");
|
||||
var fileInfo = new FileInfo(path);
|
||||
Mocker.GetMock<IDiskProvider>().Setup(c => c.FileGetLastWrite(It.IsAny<string>()))
|
||||
.Returns(new DateTime(1234));
|
||||
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(c => c.GetFileInfo(It.IsAny<string>()))
|
||||
.Returns(fileInfo);
|
||||
Mocker.GetMock<IDiskProvider>().Setup(c => c.FileExists(It.IsAny<string>()))
|
||||
.Returns(true);
|
||||
|
||||
Subject.ConvertToLocalUrls(12, covers);
|
||||
|
||||
covers.Single().Url.Should().Be($"/MediaCover/12/banner.jpg?lastWrite={fileInfo.LastWriteTimeUtc.Ticks}");
|
||||
covers.Single().Url.Should().Be("/MediaCover/12/banner.jpg?lastWrite=1234");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue