mirror of
https://github.com/Sonarr/Sonarr
synced 2026-01-26 09:22:40 +01:00
Ensure tests that log warnings don't fail
This commit is contained in:
parent
aee6158ec5
commit
4e52b3c93e
2 changed files with 9 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
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 @@ public void GetItems_should_ignore_torrents_with_empty_path()
|
|||
|
||||
items.Should().HaveCount(1);
|
||||
items.First().Title.Should().Be("Test2");
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
@ -229,6 +232,8 @@ public void GetItems_should_ignore_torrents_with_relative_path()
|
|||
|
||||
items.Should().HaveCount(1);
|
||||
items.First().Title.Should().Be("Test2");
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,6 +145,8 @@ public void should_delete_existing_file_fromdb_if_file_doesnt_exist()
|
|||
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 @@ public void should_not_try_to_recyclebin_existing_file_if_file_doesnt_exist()
|
|||
Subject.UpgradeEpisodeFile(_episodeFile, _localEpisode);
|
||||
|
||||
Mocker.GetMock<IRecycleBinProvider>().Verify(v => v.DeleteFile(It.IsAny<string>(), It.IsAny<string>()), Times.Never());
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue