1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-23 22:25:14 -04:00

Patch/onedr0p 3 14 17 (#1171)

* Upstream patch for rtorrent

* Whoops goes PTP
This commit is contained in:
Devin Buhl
2017-03-14 14:18:36 -04:00
committed by GitHub
parent 1ccfde334f
commit 18fcda5fd6
4 changed files with 88 additions and 236 deletions
@@ -25,26 +25,26 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.RTorrentTests
};
_downloading = new RTorrentTorrent
{
Hash = "HASH",
IsFinished = false,
IsOpen = true,
IsActive = true,
Name = _title,
TotalSize = 1000,
RemainingSize = 500,
Path = "somepath"
};
{
Hash = "HASH",
IsFinished = false,
IsOpen = true,
IsActive = true,
Name = _title,
TotalSize = 1000,
RemainingSize = 500,
Path = "somepath"
};
_completed = new RTorrentTorrent
{
Hash = "HASH",
IsFinished = true,
Name = _title,
TotalSize = 1000,
RemainingSize = 0,
Path = "somepath"
};
{
Hash = "HASH",
IsFinished = true,
Name = _title,
TotalSize = 1000,
RemainingSize = 0,
Path = "somepath"
};
Mocker.GetMock<ITorrentFileInfoReader>()
.Setup(s => s.GetHashFromTorrentFile(It.IsAny<byte[]>()))
@@ -54,11 +54,11 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.RTorrentTests
protected void GivenSuccessfulDownload()
{
Mocker.GetMock<IRTorrentProxy>()
.Setup(s => s.AddTorrentFromUrl(It.IsAny<string>(), It.IsAny<RTorrentSettings>()))
.Setup(s => s.AddTorrentFromUrl(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<RTorrentPriority>(), It.IsAny<string>(), It.IsAny<RTorrentSettings>()))
.Callback(PrepareClientToReturnCompletedItem);
Mocker.GetMock<IRTorrentProxy>()
.Setup(s => s.AddTorrentFromFile(It.IsAny<string>(), It.IsAny<byte[]>(), It.IsAny<RTorrentSettings>()))
.Setup(s => s.AddTorrentFromFile(It.IsAny<string>(), It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<RTorrentPriority>(), It.IsAny<string>(), It.IsAny<RTorrentSettings>()))
.Callback(PrepareClientToReturnCompletedItem);
@@ -116,11 +116,11 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.RTorrentTests
{
GivenSuccessfulDownload();
var remoteMovie = CreateRemoteMovie();
var remoteEpisode = CreateRemoteMovie();
var id = Subject.Download(remoteMovie);
var id = Subject.Download(remoteEpisode);
id.Should().NotBeNullOrEmpty();
}
}
}
}