diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2022-01-19 14:36:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-19 14:36:50 +0100 |
| commit | 8b36bc0ade036557769270f67c402ce94795b04b (patch) | |
| tree | ef0e93a0fe20a440c06574a3d16f53d7dd05facc /tests | |
| parent | 1a32153a31c9417efd52574fa44d6c337ccce3dd (diff) | |
| parent | 8b706cebef8bbb82e3bc91ee7527fb4be15ee505 (diff) | |
Merge pull request #7203 from 1337joe/fix-resolving-local-alternates
Fix resolving local alternates
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Jellyfin.Server.Implementations.Tests/Library/MovieResolverTests.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/Library/MovieResolverTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Library/MovieResolverTests.cs new file mode 100644 index 000000000..f2efcddba --- /dev/null +++ b/tests/Jellyfin.Server.Implementations.Tests/Library/MovieResolverTests.cs @@ -0,0 +1,34 @@ +using Emby.Naming.Common; +using Emby.Server.Implementations.Library.Resolvers.Movies; +using MediaBrowser.Controller; +using MediaBrowser.Controller.Drawing; +using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Providers; +using MediaBrowser.Model.IO; +using Moq; +using Xunit; + +namespace Jellyfin.Server.Implementations.Tests.Library; + +public class MovieResolverTests +{ + private static readonly NamingOptions _namingOptions = new(); + + [Fact] + public void Resolve_GivenLocalAlternateVersion_ResolvesToVideo() + { + var movieResolver = new MovieResolver(Mock.Of<IImageProcessor>(), _namingOptions); + var itemResolveArgs = new ItemResolveArgs( + Mock.Of<IServerApplicationPaths>(), + Mock.Of<IDirectoryService>()) + { + Parent = null, + FileInfo = new FileSystemMetadata + { + FullName = "/movies/Black Panther (2018)/Black Panther (2018) - 1080p 3D.mk3d" + } + }; + + Assert.NotNull(movieResolver.Resolve(itemResolveArgs)); + } +} |
