added path validation to add series/ recent folders.

This commit is contained in:
kay.one 2013-08-31 13:31:58 -07:00
commit 4465d50a31
19 changed files with 146 additions and 88 deletions

View file

@ -1,4 +1,5 @@
using NLog;
using System.Runtime.CompilerServices;
using NLog;
using NLog.Config;
using NLog.Targets;
using NUnit.Framework;
@ -39,7 +40,7 @@ namespace NzbDrone.Integration.Test
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Trace, consoleTarget));
}
[SetUp]
[TestFixtureSetUp]
public void SmokeTestSetup()
{
_runner = new NzbDroneRunner();
@ -63,7 +64,7 @@ namespace NzbDrone.Integration.Test
NamingConfig = new ClientBase<NamingConfigResource>(RestClient, "config/naming");
}
[TearDown]
[TestFixtureTearDown]
public void SmokeTestTearDown()
{
_runner.KillAll();

View file

@ -58,5 +58,17 @@ namespace NzbDrone.Integration.Test
RootFolders.All().Should().BeEmpty();
}
[Test]
public void invalid_path_should_return_bad_request()
{
var rootFolder = new RootFolderResource
{
Path = "invalid_path"
};
var postResponse = RootFolders.InvalidPost(rootFolder);
postResponse.Should().NotBeEmpty();
}
}
}

View file

@ -9,12 +9,6 @@ namespace NzbDrone.Integration.Test
[TestFixture]
public class SeriesIntegrationTest : IntegrationTest
{
[Test]
public void should_have_no_series_on_start_application()
{
Series.All().Should().BeEmpty();
}
[Test]
public void series_lookup_on_trakt()
{