mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
external notifications are now based on Events.
This commit is contained in:
@@ -9,6 +9,7 @@ using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.ExternalNotification;
|
||||
using NzbDrone.Core.Tv;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Providers;
|
||||
@@ -117,16 +118,9 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
||||
.Setup(s => s.FileExists(currentFilename))
|
||||
.Returns(true);
|
||||
|
||||
Mocker.GetMock<ExternalNotificationProvider>()
|
||||
.Setup(e => e.OnDownload("30 Rock - 1x01 - [WEBDL]", It.IsAny<Series>()));
|
||||
|
||||
//Act
|
||||
var result = Mocker.Resolve<DiskScanProvider>().MoveEpisodeFile(file, true);
|
||||
|
||||
//Assert
|
||||
result.Should().NotBeNull();
|
||||
Mocker.GetMock<ExternalNotificationProvider>()
|
||||
.Verify(e => e.OnDownload("30 Rock - 1x01 - [WEBDL]", It.IsAny<Series>()), Times.Once());
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -172,13 +166,8 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
||||
.Setup(e => e.CalculateFilePath(It.IsAny<Series>(), fakeEpisode.First().SeasonNumber, filename, ".mkv"))
|
||||
.Returns(fi);
|
||||
|
||||
Mocker.GetMock<ExternalNotificationProvider>()
|
||||
.Setup(e => e.OnDownload("30 Rock - 1x01 - [WEBDL]", It.IsAny<Series>()));
|
||||
|
||||
//Act
|
||||
var result = Mocker.Resolve<DiskScanProvider>().MoveEpisodeFile(file, true);
|
||||
|
||||
//Assert
|
||||
result.Should().BeNull();
|
||||
ExceptionVerification.ExpectedErrors(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user