diff --git a/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj b/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj
index d11d1784f..7c336ec70 100644
--- a/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj
+++ b/NzbDrone.Common.Test/NzbDrone.Common.Test.csproj
@@ -63,6 +63,7 @@
+
diff --git a/NzbDrone.Common.Test/WebClientTests.cs b/NzbDrone.Common.Test/WebClientTests.cs
new file mode 100644
index 000000000..64613a730
--- /dev/null
+++ b/NzbDrone.Common.Test/WebClientTests.cs
@@ -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);
+ }
+ }
+}
diff --git a/NzbDrone.Update/Providers/DiskProvider.cs b/NzbDrone.Common/DiskProvider.cs
similarity index 98%
rename from NzbDrone.Update/Providers/DiskProvider.cs
rename to NzbDrone.Common/DiskProvider.cs
index b5b5b85a4..baa0fb51f 100644
--- a/NzbDrone.Update/Providers/DiskProvider.cs
+++ b/NzbDrone.Common/DiskProvider.cs
@@ -4,7 +4,7 @@ using System.IO;
using System.Linq;
using NLog;
-namespace NzbDrone.Update.Providers
+namespace NzbDrone.Common
{
public class DiskProvider
{
diff --git a/NzbDrone.Common/NzbDrone.Common.csproj b/NzbDrone.Common/NzbDrone.Common.csproj
index f978fa966..fc6435ba5 100644
--- a/NzbDrone.Common/NzbDrone.Common.csproj
+++ b/NzbDrone.Common/NzbDrone.Common.csproj
@@ -46,6 +46,7 @@
+
diff --git a/NzbDrone.Update.Test/UpdateProviderVerifyTest.cs b/NzbDrone.Update.Test/UpdateProviderVerifyTest.cs
index 0abb6d51a..1e4d833d2 100644
--- a/NzbDrone.Update.Test/UpdateProviderVerifyTest.cs
+++ b/NzbDrone.Update.Test/UpdateProviderVerifyTest.cs
@@ -3,6 +3,7 @@ using System;
using System.IO;
using AutoMoq;
using FluentAssertions;
+using Moq;
using NUnit.Framework;
using NzbDrone.Common;
using NzbDrone.Update.Providers;
@@ -59,5 +60,19 @@ namespace NzbDrone.Update.Test
Assert.Throws(() => mocker.Resolve().Verify(targetFolder))
.Message.Should().StartWith("Update folder doesn't exist");
}
+
+ [Test]
+ public void verify_should_pass_if_update_folder_and_target_folder_both_exist()
+ {
+ const string targetFolder = "c:\\NzbDrone\\";
+
+ mocker.GetMock()
+ .Setup(c => c.FolderExists(It.IsAny()))
+ .Returns(true);
+
+ mocker.Resolve().Verify(targetFolder);
+
+ mocker.VerifyAllMocks();
+ }
}
}
diff --git a/NzbDrone.Update/NzbDrone.Update.csproj b/NzbDrone.Update/NzbDrone.Update.csproj
index 683cef1b4..57ad4fec1 100644
--- a/NzbDrone.Update/NzbDrone.Update.csproj
+++ b/NzbDrone.Update/NzbDrone.Update.csproj
@@ -48,7 +48,6 @@
-