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
using FluentAssertions;
|
|
using NUnit.Framework;
|
|
using Sonarr.Api.V3.Blocklist;
|
|
using Sonarr.Api.V3.Series;
|
|
|
|
namespace NzbDrone.Integration.Test.ApiTests
|
|
{
|
|
[TestFixture]
|
|
public class BlocklistFixture : IntegrationTest
|
|
{
|
|
private SeriesResource _series;
|
|
|
|
[Test]
|
|
[Ignore("Adding to blocklist not supported")]
|
|
public void should_be_able_to_add_to_blocklist()
|
|
{
|
|
_series = EnsureSeries(266189, "The Blacklist");
|
|
|
|
Blocklist.Post(new BlocklistResource
|
|
{
|
|
SeriesId = _series.Id,
|
|
SourceTitle = "Blacklist.S01E01.Brought.To.You.By-BoomBoxHD"
|
|
});
|
|
}
|
|
|
|
[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);
|
|
}
|
|
}
|
|
}
|