Clean up media cover service fixture

This commit is contained in:
Bogdan 2025-04-02 15:50:50 +03:00
parent 49b0c9639c
commit 6d34f2afb1

View file

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using FizzWare.NBuilder;
using FluentAssertions;
@ -60,13 +59,6 @@ public void should_convert_media_urls_to_local_without_time_if_file_doesnt_exist
new MediaCover.MediaCover { CoverType = MediaCoverTypes.Banner }
};
var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "Files", "Media", "NonExistant.mp4");
var fileInfo = new FileInfo(path);
Mocker.GetMock<IDiskProvider>()
.Setup(c => c.GetFileInfo(It.IsAny<string>()))
.Returns(fileInfo);
Subject.ConvertToLocalUrls(12, covers);
covers.Single().Url.Should().Be("/MediaCover/12/banner.jpg");