|
|
@ -24,6 +24,24 @@ namespace NzbDrone.Core.Test.IndexerTests.NewznabTests
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[TestCase("")]
|
|
|
|
|
|
|
|
[TestCase(" ")]
|
|
|
|
|
|
|
|
[TestCase(null)]
|
|
|
|
|
|
|
|
public void invalid_url_should_not_apikey(string url)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var setting = new NewznabSettings
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ApiKey = "",
|
|
|
|
|
|
|
|
Url = url
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setting.Validate().IsValid.Should().BeFalse();
|
|
|
|
|
|
|
|
setting.Validate().Errors.Should().NotContain(c => c.PropertyName == "ApiKey");
|
|
|
|
|
|
|
|
setting.Validate().Errors.Should().Contain(c => c.PropertyName == "Url");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[TestCase("http://nzbs2.org")]
|
|
|
|
[TestCase("http://nzbs2.org")]
|
|
|
|
public void doesnt_requires_apikey(string url)
|
|
|
|
public void doesnt_requires_apikey(string url)
|
|
|
|