|
|
|
@ -61,5 +61,40 @@ namespace NzbDrone.Core.Test.IndexerTests.NewznabTests
|
|
|
|
|
page.Url.Query.Should().Contain("artist=Alien%20Ant%20Farm");
|
|
|
|
|
page.Url.Query.Should().Contain("album=TruANT");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_encode_raw_title()
|
|
|
|
|
{
|
|
|
|
|
_capabilities.SupportedTvSearchParameters = new[] { "q", "season", "ep" };
|
|
|
|
|
_capabilities.TvTextSearchEngine = "raw";
|
|
|
|
|
_singleEpisodeSearchCriteria.SceneTitles[0] = "Edith & Little";
|
|
|
|
|
|
|
|
|
|
var results = Subject.GetSearchRequests(_singleEpisodeSearchCriteria);
|
|
|
|
|
results.Tiers.Should().Be(1);
|
|
|
|
|
|
|
|
|
|
var pageTier = results.GetTier(0).First().First();
|
|
|
|
|
|
|
|
|
|
pageTier.Url.Query.Should().Contain("q=Edith%20%26%20Little");
|
|
|
|
|
pageTier.Url.Query.Should().NotContain(" & ");
|
|
|
|
|
pageTier.Url.Query.Should().Contain("%26");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_use_clean_title_and_encode()
|
|
|
|
|
{
|
|
|
|
|
_capabilities.SupportedTvSearchParameters = new[] { "q", "season", "ep" };
|
|
|
|
|
_capabilities.TvTextSearchEngine = "sphinx";
|
|
|
|
|
_singleEpisodeSearchCriteria.SceneTitles[0] = "Edith & Little";
|
|
|
|
|
|
|
|
|
|
var results = Subject.GetSearchRequests(_singleEpisodeSearchCriteria);
|
|
|
|
|
results.Tiers.Should().Be(1);
|
|
|
|
|
|
|
|
|
|
var pageTier = results.GetTier(0).First().First();
|
|
|
|
|
|
|
|
|
|
pageTier.Url.Query.Should().Contain("q=Edith%20and%20Little");
|
|
|
|
|
pageTier.Url.Query.Should().Contain("and");
|
|
|
|
|
pageTier.Url.Query.Should().NotContain(" & ");
|
|
|
|
|
pageTier.Url.Query.Should().NotContain("%26");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|