mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
New: Added NzbClub.com as an indexer, enabled by default
This commit is contained in:
parent
3a8f40511d
commit
a947cd2743
6 changed files with 420 additions and 3 deletions
|
@ -34,6 +34,7 @@ namespace NzbDrone.Core.Test
|
|||
[TestCase("wombles.xml")]
|
||||
[TestCase("filesharingtalk.xml")]
|
||||
[TestCase("nzbindex.xml")]
|
||||
[TestCase("nzbclub.xml")]
|
||||
public void parse_feed_xml(string fileName)
|
||||
{
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
|
@ -258,8 +259,6 @@ namespace NzbDrone.Core.Test
|
|||
result.Should().NotBeEmpty();
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Test]
|
||||
public void nzbmatrix_multi_word_search_returns_valid_results()
|
||||
{
|
||||
|
@ -274,7 +273,6 @@ namespace NzbDrone.Core.Test
|
|||
result.Should().NotBeEmpty();
|
||||
}
|
||||
|
||||
|
||||
[TestCase("hawaii five-0 (2010)", "hawaii+five+0+2010")]
|
||||
[TestCase("this& that", "this+that")]
|
||||
[TestCase("this& that", "this+that")]
|
||||
|
@ -400,6 +398,22 @@ namespace NzbDrone.Core.Test
|
|||
parseResults[0].Size.Should().Be(587328389);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void size_nzbclub()
|
||||
{
|
||||
WithConfiguredIndexers();
|
||||
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
|
||||
.Returns(File.OpenRead(".\\Files\\Rss\\SizeParsing\\nzbclub.xml"));
|
||||
|
||||
//Act
|
||||
var parseResults = Mocker.Resolve<NzbClub>().FetchRss();
|
||||
|
||||
parseResults.Should().HaveCount(1);
|
||||
parseResults[0].Size.Should().Be(2652142305);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Server_Unavailable_503_should_not_log_exception()
|
||||
{
|
||||
|
@ -500,5 +514,21 @@ namespace NzbDrone.Core.Test
|
|||
parseResults.Should().HaveCount(1);
|
||||
parseResults[0].CleanTitle.Should().Be("britainsgotmoretalent");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void title_preparse_nzbclub()
|
||||
{
|
||||
WithConfiguredIndexers();
|
||||
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
|
||||
.Returns(File.OpenRead(".\\Files\\Rss\\SizeParsing\\nzbclub.xml"));
|
||||
|
||||
//Act
|
||||
var parseResults = Mocker.Resolve<NzbIndex>().FetchRss();
|
||||
|
||||
parseResults.Should().HaveCount(1);
|
||||
parseResults[0].CleanTitle.Should().Be("britainsgottalent");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue