1
0
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:
Touchstone64
2025-12-01 10:58:04 +00:00
committed by Mark McDowall
parent aee6158ec5
commit 4e52b3c93e
2 changed files with 9 additions and 0 deletions

View File

@@ -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);
}
}
}

View File

@@ -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]