mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-03-05 13:20:20 -05:00
Ensure tests that log warnings don't fail
This commit is contained in:
committed by
Mark McDowall
parent
aee6158ec5
commit
4e52b3c93e
@@ -7,6 +7,7 @@ using NUnit.Framework;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.Download.Clients.RQBit;
|
||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.Core.Test.Download.DownloadClientTests.RQBitTests
|
||||
{
|
||||
@@ -212,6 +213,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.RQBitTests
|
||||
|
||||
items.Should().HaveCount(1);
|
||||
items.First().Title.Should().Be("Test2");
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -229,6 +232,8 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.RQBitTests
|
||||
|
||||
items.Should().HaveCount(1);
|
||||
items.First().Title.Should().Be("Test2");
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +145,8 @@ namespace NzbDrone.Core.Test.MediaFiles
|
||||
Subject.UpgradeEpisodeFile(_episodeFile, _localEpisode);
|
||||
|
||||
Mocker.GetMock<IMediaFileService>().Verify(v => v.Delete(_localEpisode.Episodes.Single().EpisodeFile, DeleteMediaFileReason.Upgrade), Times.Once());
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -159,6 +161,8 @@ namespace NzbDrone.Core.Test.MediaFiles
|
||||
Subject.UpgradeEpisodeFile(_episodeFile, _localEpisode);
|
||||
|
||||
Mocker.GetMock<IRecycleBinProvider>().Verify(v => v.DeleteFile(It.IsAny<string>(), It.IsAny<string>()), Times.Never());
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user