mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
More NzbDrone.Common updates
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// ReSharper disable InconsistentNaming
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace NzbDrone.Common.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class WebClientTests
|
||||
{
|
||||
[Test]
|
||||
public void DownloadString_should_be_able_to_download_jquery()
|
||||
{
|
||||
var jquery = new WebClientProvider().DownloadString("http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
|
||||
|
||||
jquery.Should().NotBeBlank();
|
||||
jquery.Should().Contain("function(a,b)");
|
||||
}
|
||||
|
||||
[TestCase("")]
|
||||
[TestCase("http://")]
|
||||
[TestCase(null)]
|
||||
[ExpectedException]
|
||||
public void DownloadString_should_throw_on_error(string url)
|
||||
{
|
||||
var jquery = new WebClientProvider().DownloadString(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user