From 6e792c6916843bedf11c6f5a375f0f8ca2339d07 Mon Sep 17 00:00:00 2001 From: kayone Date: Sun, 10 Nov 2013 20:48:24 -0800 Subject: [PATCH] fixed local integration tests. --- src/NzbDrone.Integration.Test/NzbDroneRunner.cs | 14 ++++++-------- src/UI/Navbar/NavbarView.js | 1 - 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/NzbDrone.Integration.Test/NzbDroneRunner.cs b/src/NzbDrone.Integration.Test/NzbDroneRunner.cs index 375fdc0b9..44dc3f5be 100644 --- a/src/NzbDrone.Integration.Test/NzbDroneRunner.cs +++ b/src/NzbDrone.Integration.Test/NzbDroneRunner.cs @@ -5,7 +5,6 @@ using System.Linq; using System.Threading; using System.Xml.Linq; using NUnit.Framework; -using NzbDrone.Common; using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Processes; using NzbDrone.Core.Configuration; @@ -41,8 +40,7 @@ namespace NzbDrone.Integration.Test if (BuildInfo.IsDebug) { - - Start("..\\..\\..\\..\\_output\\NzbDrone.Console.exe"); + Start("..\\..\\..\\..\\..\\_output\\NzbDrone.Console.exe"); } else { @@ -58,7 +56,7 @@ namespace NzbDrone.Integration.Test Assert.Fail("Process has exited"); } - SetApiKey(); + ApiKey = GetApiKey(); var request = new RestRequest("system/status"); request.AddHeader("Authorization", ApiKey); @@ -100,16 +98,16 @@ namespace NzbDrone.Integration.Test } } - private void SetApiKey() + private string GetApiKey() { var configFile = Path.Combine(AppData, "config.xml"); - if (!String.IsNullOrWhiteSpace(ApiKey)) return; - if (!File.Exists(configFile)) return; + if (!String.IsNullOrWhiteSpace(ApiKey)) return ApiKey; + if (!File.Exists(configFile)) return null; var xDoc = XDocument.Load(configFile); var config = xDoc.Descendants(ConfigFileProvider.CONFIG_ELEMENT_NAME).Single(); - ApiKey = config.Descendants("ApiKey").Single().Value; + return config.Descendants("ApiKey").Single().Value; } } } \ No newline at end of file diff --git a/src/UI/Navbar/NavbarView.js b/src/UI/Navbar/NavbarView.js index fce2d5268..e007712e6 100644 --- a/src/UI/Navbar/NavbarView.js +++ b/src/UI/Navbar/NavbarView.js @@ -2,7 +2,6 @@ define( [ 'marionette', - 'Navbar/Search', 'jquery' ], function (Marionette, $) { return Marionette.ItemView.extend({