mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
Improved error message when nzb download contains an newznab error instead
Signed-off-by: Robin Dadswell <robin@dadswell.email>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
@@ -31,6 +32,17 @@ namespace NzbDrone.Core.Test.Download
|
||||
Assert.Throws<InvalidNzbException>(() => Subject.Validate(filename, fileContent));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_throw_on_newznab_error()
|
||||
{
|
||||
var filename = "NewznabError";
|
||||
var fileContent = GivenNzbFile(filename);
|
||||
|
||||
var ex = Assert.Throws<InvalidNzbException>(() => Subject.Validate(filename, fileContent));
|
||||
|
||||
ex.Message.Should().Contain("201 - Incorrect parameter");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_validate_nzb()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user