mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 05:16:34 +02:00
Refactored IntegrationTests to work with Nunit3 VS adapter.
This commit is contained in:
52
src/NzbDrone.Integration.Test/ApiTests/BlacklistFixture.cs
Normal file
52
src/NzbDrone.Integration.Test/ApiTests/BlacklistFixture.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Api.Series;
|
||||
using System.Linq;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.Integration.Test.ApiTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class BlacklistFixture : IntegrationTest
|
||||
{
|
||||
private SeriesResource _series;
|
||||
|
||||
[Test]
|
||||
[Ignore("Adding to blacklist not supported")]
|
||||
public void should_be_able_to_add_to_blacklist()
|
||||
{
|
||||
_series = EnsureSeries(266189, "The Blacklist");
|
||||
|
||||
Blacklist.Post(new Api.Blacklist.BlacklistResource
|
||||
{
|
||||
SeriesId = _series.Id,
|
||||
SourceTitle = "Blacklist.S01E01.Brought.To.You.By-BoomBoxHD"
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Adding to blacklist not supported")]
|
||||
public void should_be_able_to_get_all_blacklisted()
|
||||
{
|
||||
var result = Blacklist.GetPaged(0, 1000, "date", "desc");
|
||||
|
||||
result.Should().NotBeNull();
|
||||
result.TotalRecords.Should().Be(1);
|
||||
result.Records.Should().NotBeNullOrEmpty();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore("Adding to blacklist not supported")]
|
||||
public void should_be_able_to_remove_from_blacklist()
|
||||
{
|
||||
Blacklist.Delete(1);
|
||||
|
||||
var result = Blacklist.GetPaged(0, 1000, "date", "desc");
|
||||
|
||||
result.Should().NotBeNull();
|
||||
result.TotalRecords.Should().Be(0);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user