You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readarr/src/NzbDrone.Integration.Test/ApiTests/BlocklistFixture.cs

50 lines
1.4 KiB

using FluentAssertions;
using NUnit.Framework;
using Readarr.Api.V1.Author;
using Readarr.Api.V1.Blocklist;
namespace NzbDrone.Integration.Test.ApiTests
{
[TestFixture]
public class BlocklistFixture : IntegrationTest
{
private AuthorResource _author;
[Test]
[Ignore("Adding to blocklist not supported")]
public void should_be_able_to_add_to_blocklist()
{
_author = EnsureAuthor("14586394", "43765115", "Andrew Hunter Murray");
Blocklist.Post(new BlocklistResource
{
AuthorId = _author.Id,
SourceTitle = "Blacklist - Book 1 [2015 FLAC]"
});
}
[Test]
[Ignore("Adding to blocklist not supported")]
public void should_be_able_to_get_all_blocklisted()
{
var result = Blocklist.GetPaged(0, 1000, "date", "desc");
result.Should().NotBeNull();
result.TotalRecords.Should().Be(1);
result.Records.Should().NotBeNullOrEmpty();
}
[Test]
[Ignore("Adding to blocklist not supported")]
public void should_be_able_to_remove_from_blocklist()
{
Blocklist.Delete(1);
var result = Blocklist.GetPaged(0, 1000, "date", "desc");
result.Should().NotBeNull();
result.TotalRecords.Should().Be(0);
}
}
}