mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Fixed: Manually marking a grabbed release failed will now mark all episodes in that release failed instead of only one.
This commit is contained in:
@@ -9,6 +9,7 @@ using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.History;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.Core.Test.Download
|
||||
{
|
||||
@@ -379,6 +380,30 @@ namespace NzbDrone.Core.Test.Download
|
||||
Subject.Execute(new CheckForFinishedDownloadCommand());
|
||||
|
||||
VerifyNoFailedDownloads();
|
||||
|
||||
ExceptionVerification.IgnoreWarns();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_manual_mark_all_episodes_of_release_as_failed()
|
||||
{
|
||||
var historyFailed = Builder<History.History>.CreateListOfSize(2)
|
||||
.All()
|
||||
.With(v => v.EventType == HistoryEventType.Grabbed)
|
||||
.Do(v => v.Data.Add("downloadClient", "SabnzbdClient"))
|
||||
.Do(v => v.Data.Add("downloadClientId", "test"))
|
||||
.Build()
|
||||
.ToList();
|
||||
|
||||
GivenGrabbedHistory(historyFailed);
|
||||
|
||||
Mocker.GetMock<IHistoryService>()
|
||||
.Setup(s => s.Get(It.IsAny<Int32>()))
|
||||
.Returns<Int32>(i => historyFailed.FirstOrDefault(v => v.Id == i));
|
||||
|
||||
Subject.MarkAsFailed(1);
|
||||
|
||||
VerifyFailedDownloads(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user