From 7349f78b80596e16eefa1586e70925e212d99926 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Tue, 29 Mar 2016 10:44:23 +0100 Subject: [PATCH] Fixed the tests --- PlexRequests.UI.Tests/AdminModuleTests.cs | 3 +++ PlexRequests.UI/Modules/AdminModule.cs | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/PlexRequests.UI.Tests/AdminModuleTests.cs b/PlexRequests.UI.Tests/AdminModuleTests.cs index fc8686086..34b2af4a7 100644 --- a/PlexRequests.UI.Tests/AdminModuleTests.cs +++ b/PlexRequests.UI.Tests/AdminModuleTests.cs @@ -59,6 +59,7 @@ namespace PlexRequests.UI.Tests private Mock> EmailMock { get; set; } private Mock> PushbulletSettings { get; set; } private Mock> PushoverSettings { get; set; } + private Mock> HeadphonesSettings { get; set; } private Mock PlexMock { get; set; } private Mock SonarrApiMock { get; set; } private Mock PushbulletApi { get; set; } @@ -94,6 +95,7 @@ namespace PlexRequests.UI.Tests PushoverSettings = new Mock>(); PushoverApi = new Mock(); NotificationService = new Mock(); + HeadphonesSettings = new Mock>(); Bootstrapper = new ConfigurableBootstrapper(with => { @@ -114,6 +116,7 @@ namespace PlexRequests.UI.Tests with.Dependency(PushoverSettings.Object); with.Dependency(PushoverApi.Object); with.Dependency(NotificationService.Object); + with.Dependency(HeadphonesSettings.Object); with.RootPathProvider(); with.RequestStartup((container, pipelines, context) => { diff --git a/PlexRequests.UI/Modules/AdminModule.cs b/PlexRequests.UI/Modules/AdminModule.cs index 4009f1b5e..e62b8b97b 100644 --- a/PlexRequests.UI/Modules/AdminModule.cs +++ b/PlexRequests.UI/Modules/AdminModule.cs @@ -67,7 +67,7 @@ namespace PlexRequests.UI.Modules private ISettingsService EmailService { get; } private ISettingsService PushbulletService { get; } private ISettingsService PushoverService { get; } - private ISettingsService HeadphonesSerivce { get; } + private ISettingsService HeadphonesService { get; } private IPlexApi PlexApi { get; } private ISonarrApi SonarrApi { get; } private IPushbulletApi PushbulletApi { get; } @@ -111,7 +111,7 @@ namespace PlexRequests.UI.Modules PushoverService = pushoverSettings; PushoverApi = pushoverApi; NotificationService = notify; - HeadphonesSerivce = headphones; + HeadphonesService = headphones; #if !DEBUG this.RequiresAuthentication(); @@ -520,7 +520,7 @@ namespace PlexRequests.UI.Modules private Negotiator Headphones() { - var settings = HeadphonesSerivce.GetSettings(); + var settings = HeadphonesService.GetSettings(); return View["Headphones", settings]; } @@ -537,7 +537,7 @@ namespace PlexRequests.UI.Modules } Log.Trace(settings.DumpJson()); - var result = HeadphonesSerivce.SaveSettings(settings); + var result = HeadphonesService.SaveSettings(settings); Log.Info("Saved headphones settings, result: {0}", result); return Response.AsJson(result