mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
fixed Newznab category numbers.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
using FluentAssertions;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.Indexers.Newznab;
|
||||
using NzbDrone.Core.Indexers.NzbClub;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.IndexerTests.IntegrationTests
|
||||
{
|
||||
public class IndexerIntegrationTests : CoreTest<FetchFeedService>
|
||||
{
|
||||
[Test]
|
||||
public void nzbclub_rss()
|
||||
{
|
||||
UseRealHttp();
|
||||
|
||||
var indexer = new NzbClub();
|
||||
|
||||
var result = Subject.FetchRss(indexer);
|
||||
|
||||
result.Should().NotBeEmpty();
|
||||
result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.Title));
|
||||
result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbUrl));
|
||||
|
||||
//TODO: uncomment these after moving to restsharp for rss
|
||||
//result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbInfoUrl));
|
||||
//result.Should().OnlyContain(c => c.Size > 0);
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Explicit("needs newznab api key")]
|
||||
public void nzbsorg_rss()
|
||||
{
|
||||
UseRealHttp();
|
||||
|
||||
var indexer = new Newznab();
|
||||
indexer.Settings = new NewznabSettings
|
||||
{
|
||||
ApiKey = "",
|
||||
Url = "http://nzbs.org"
|
||||
};
|
||||
|
||||
indexer.InstanceDefinition = new IndexerDefinition();
|
||||
|
||||
var result = Subject.FetchRss(indexer);
|
||||
|
||||
result.Should().NotBeEmpty();
|
||||
result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.Title));
|
||||
result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbUrl));
|
||||
|
||||
//TODO: uncomment these after moving to restsharp for rss
|
||||
//result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbInfoUrl));
|
||||
//result.Should().OnlyContain(c => c.Size > 0);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using FluentAssertions;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.Indexers.NzbClub;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.IndexerTests.IntegrationTests
|
||||
{
|
||||
public class NzbClubIntegrationTests : CoreTest<FetchFeedService>
|
||||
{
|
||||
[Test]
|
||||
public void should_be_able_to_fetch_rss()
|
||||
{
|
||||
UseRealHttp();
|
||||
|
||||
var indexer = new NzbClub();
|
||||
|
||||
var result = Subject.FetchRss(indexer);
|
||||
|
||||
result.Should().NotBeEmpty();
|
||||
result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.Title));
|
||||
result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbUrl));
|
||||
|
||||
//TODO: uncomment these after moving to restsharp for rss
|
||||
//result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbInfoUrl));
|
||||
//result.Should().OnlyContain(c => c.Size > 0);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@
|
||||
<Compile Include="IndexerTests\BasicRssParserFixture.cs" />
|
||||
<Compile Include="IndexerTests\IndexerServiceFixture.cs" />
|
||||
<Compile Include="IndexerTests\IntegrationTests\NzbxIntegrationTests.cs" />
|
||||
<Compile Include="IndexerTests\IntegrationTests\NzbClubIntegrationTests.cs" />
|
||||
<Compile Include="IndexerTests\IntegrationTests\IndexerIntegrationTests.cs" />
|
||||
<Compile Include="IndexerTests\ParserTests\NzbxParserFixture.cs" />
|
||||
<Compile Include="JobTests\JobRepositoryFixture.cs" />
|
||||
<Compile Include="DecisionEngineTests\LanguageSpecificationFixture.cs" />
|
||||
|
||||
Reference in New Issue
Block a user