Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowghost committed Jun 4, 2024
1 parent 57ae0b5 commit 918a36d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/Jellyfin.Providers.Tests/Manager/ItemImageProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -575,18 +575,22 @@ private static Video GetItemWithImages(ImageType type, int count, bool validPath
// Has to exist for querying DateModified time on file, results stored but not checked so not populating
BaseItem.FileSystem ??= Mock.Of<IFileSystem>();

var item = new Video();
var item = new Mock<Video>
{
CallBase = true
};
item.Setup(m => m.IsSaveLocalMetadataEnabled()).Returns(false);

var path = validPaths ? _testDataImagePath.Format : "invalid path {0}";
for (int i = 0; i < count; i++)
{
item.SetImagePath(type, i, new FileSystemMetadata
item.Object.SetImagePath(type, i, new FileSystemMetadata
{
FullName = string.Format(CultureInfo.InvariantCulture, path, i),
});
}

return item;
return item.Object;
}

private static ILocalImageProvider GetImageProvider(ImageType type, int count, bool validPaths)
Expand Down

0 comments on commit 918a36d

Please sign in to comment.