mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-27 22:56:45 -04:00
New: Added global Remote Path mapping table to replace individual Local Category Path settings.
This commit is contained in:
@@ -13,6 +13,7 @@ using NzbDrone.Core.Download.Clients.Nzbget;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Test.Common;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Core.RemotePathMappings;
|
||||
|
||||
namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
||||
{
|
||||
@@ -92,11 +93,6 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
||||
.Returns(configItems);
|
||||
}
|
||||
|
||||
protected void GivenMountPoint(String mountPath)
|
||||
{
|
||||
(Subject.Definition.Settings as NzbgetSettings).TvCategoryLocalPath = mountPath;
|
||||
}
|
||||
|
||||
protected void GivenFailedDownload()
|
||||
{
|
||||
Mocker.GetMock<INzbgetProxy>()
|
||||
@@ -251,7 +247,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
||||
[Test]
|
||||
public void should_return_status_with_mounted_outputdir()
|
||||
{
|
||||
GivenMountPoint(@"O:\mymount".AsOsAgnostic());
|
||||
Mocker.GetMock<IRemotePathMappingService>()
|
||||
.Setup(v => v.RemapRemoteToLocal("127.0.0.1", "/remote/mount/tv"))
|
||||
.Returns(@"O:\mymount".AsOsAgnostic());
|
||||
|
||||
var result = Subject.GetStatus();
|
||||
|
||||
@@ -263,7 +261,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
||||
[Test]
|
||||
public void should_remap_storage_if_mounted()
|
||||
{
|
||||
GivenMountPoint(@"O:\mymount".AsOsAgnostic());
|
||||
Mocker.GetMock<IRemotePathMappingService>()
|
||||
.Setup(v => v.RemapRemoteToLocal("127.0.0.1", "/remote/mount/tv/Droned.S01E01.Pilot.1080p.WEB-DL-DRONE"))
|
||||
.Returns(@"O:\mymount\Droned.S01E01.Pilot.1080p.WEB-DL-DRONE".AsOsAgnostic());
|
||||
|
||||
GivenQueue(null);
|
||||
GivenHistory(_completed);
|
||||
|
||||
Reference in New Issue
Block a user