From 0fb07a54d6ac2bcc7368cfca103bcd619efb658a Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 8 Feb 2021 11:10:42 -0800 Subject: [PATCH] Add test for Scene name not being set during import (cherry picked from commit 044342f6779740a630eb56eba7587fb8da5d77f6) Closes #1994 --- .../MediaFiles/ImportApprovedTracksFixture.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/NzbDrone.Core.Test/MediaFiles/ImportApprovedTracksFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/ImportApprovedTracksFixture.cs index 8437e1d76..913e2b5ad 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/ImportApprovedTracksFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/ImportApprovedTracksFixture.cs @@ -218,5 +218,18 @@ public void should_delete_existing_trackfiles_with_the_same_path() Mocker.GetMock() .Verify(v => v.Delete(It.IsAny(), DeleteMediaFileReason.ManualOverride), Times.Once()); } + + [Test] + public void should_include_scene_name_with_new_downloads() + { + var firstDecision = _approvedDecisions.First(); + firstDecision.Item.SceneName = "Artist.Name.Album.Name.TrackNum.Track.Title.MP3256"; + + Subject.Import(new List> { _approvedDecisions.First() }, true); + + Mocker.GetMock() + .Verify(v => v.UpgradeTrackFile(It.Is(e => e.SceneName == firstDecision.Item.SceneName), _approvedDecisions.First().Item, false), + Times.Once()); + } } }