diff --git a/NzbDrone.Core.Test/ProviderTests/BannerProviderTest.cs b/NzbDrone.Core.Test/ProviderTests/BannerProviderTest.cs index b0d8e741f..33622ed47 100644 --- a/NzbDrone.Core.Test/ProviderTests/BannerProviderTest.cs +++ b/NzbDrone.Core.Test/ProviderTests/BannerProviderTest.cs @@ -13,6 +13,7 @@ using NzbDrone.Core.Repository; using NzbDrone.Core.Repository.Quality; using NzbDrone.Core.Test.Framework; using NzbDrone.Test.Common.AutoMoq; +using NzbDrone.Test.Common; namespace NzbDrone.Core.Test.ProviderTests { @@ -26,6 +27,8 @@ namespace NzbDrone.Core.Test.ProviderTests [SetUp] public void Setup() { + WithTempAsAppPath(); + _series = Builder.CreateNew() .With(s => s.SeriesId = 12345) .Build(); @@ -97,6 +100,7 @@ namespace NzbDrone.Core.Test.ProviderTests var result = Mocker.Resolve().Delete(1); result.Should().BeFalse(); + ExceptionVerification.ExpectedWarns(1); } } } \ No newline at end of file diff --git a/NzbDrone.Core/Providers/BannerProvider.cs b/NzbDrone.Core/Providers/BannerProvider.cs index e03466c76..39524bd2a 100644 --- a/NzbDrone.Core/Providers/BannerProvider.cs +++ b/NzbDrone.Core/Providers/BannerProvider.cs @@ -34,12 +34,12 @@ namespace NzbDrone.Core.Providers public virtual bool Download(ProgressNotification notification, Series series) { - var bannerPath = _environmentProvider.GetBannerPath(); - - logger.Trace("Ensuring Banner Folder exists: ", bannerPath); - _diskProvider.CreateDirectory(bannerPath); + //var bannerPath = _environmentProvider.GetBannerPath(); + + logger.Trace("Ensuring Banner Folder exists: ", _environmentProvider.GetBannerPath()); + _diskProvider.CreateDirectory(_environmentProvider.GetBannerPath()); - var bannerFilename = Path.Combine(bannerPath, series.SeriesId.ToString()) + ".jpg"; + var bannerFilename = Path.Combine(_environmentProvider.GetBannerPath(), series.SeriesId.ToString()) + ".jpg"; notification.CurrentMessage = string.Format("Downloading banner for '{0}'", series.Title); logger.Trace("Downloading banner for '{0}'", series.Title); diff --git a/NzbDrone.Test.Common/ExceptionVerification.cs b/NzbDrone.Test.Common/ExceptionVerification.cs index 40dfe9057..069227ff9 100644 --- a/NzbDrone.Test.Common/ExceptionVerification.cs +++ b/NzbDrone.Test.Common/ExceptionVerification.cs @@ -51,17 +51,17 @@ namespace NzbDrone.Test.Common public static void ExpectedErrors(int count) { - Excpected(LogLevel.Error, count); + Expected(LogLevel.Error, count); } public static void ExpectedFatals(int count) { - Excpected(LogLevel.Fatal, count); + Expected(LogLevel.Fatal, count); } public static void ExpectedWarns(int count) { - Excpected(LogLevel.Warn, count); + Expected(LogLevel.Warn, count); } public static void IgnoreWarns() @@ -96,7 +96,7 @@ namespace NzbDrone.Test.Common } } - private static void Excpected(LogLevel level, int count) + private static void Expected(LogLevel level, int count) { var levelLogs = _logs.Where(l => l.Level == level).ToList();