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