mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-17 15:59:36 +02:00
fixed Newznab category numbers.
This commit is contained in:
parent
a7fc3f9776
commit
13cff22cf8
@ -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" />
|
||||
|
@ -5,7 +5,7 @@ namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
public abstract class IndexerWithSetting<TSetting> : IndexerBase where TSetting : class, IIndexerSetting, new()
|
||||
{
|
||||
public TSetting Settings { get; private set; }
|
||||
public TSetting Settings { get; set; }
|
||||
|
||||
public TSetting ImportSettingsFromJson(string json)
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ public override IEnumerable<string> RecentFeed
|
||||
{
|
||||
get
|
||||
{
|
||||
var url = String.Format("{0}/api?t=tvsearch&cat=5030,5040,5070,5090s", Settings.Url);
|
||||
var url = String.Format("{0}/api?t=tvsearch&cat=5000", Settings.Url);
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(Settings.ApiKey))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user