mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Fixed header request.
This commit is contained in:
parent
233def11c7
commit
a997c10ca1
4 changed files with 16 additions and 8 deletions
|
@ -6,12 +6,12 @@ using NzbDrone.Test.Common;
|
|||
namespace NzbDrone.Common.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class WebClientTests : TestBase
|
||||
public class WebClientTests : TestBase<HttpProvider>
|
||||
{
|
||||
[Test]
|
||||
public void DownloadString_should_be_able_to_dowload_text_file()
|
||||
{
|
||||
var jquery = new HttpProvider(new EnvironmentProvider()).DownloadString("http://www.google.com/robots.txt");
|
||||
var jquery = Subject.DownloadString("http://www.google.com/robots.txt");
|
||||
|
||||
jquery.Should().NotBeBlank();
|
||||
jquery.Should().Contain("Sitemap");
|
||||
|
@ -23,7 +23,15 @@ namespace NzbDrone.Common.Test
|
|||
[ExpectedException]
|
||||
public void DownloadString_should_throw_on_error(string url)
|
||||
{
|
||||
var jquery = new HttpProvider(new EnvironmentProvider()).DownloadString(url);
|
||||
var jquery = Subject.DownloadString(url);
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_get_headers()
|
||||
{
|
||||
Subject.GetHeader("http://www.google.com").Should().NotBeEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue