mirror of
https://github.com/Readarr/Readarr
synced 2025-12-15 21:02:40 +01:00
Fix tests
This commit is contained in:
parent
34bd1a5876
commit
ad2b3e5cc5
1 changed files with 10 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
|||
using NzbDrone.Core.Books;
|
||||
using NzbDrone.Core.Exceptions;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
using NzbDrone.Core.RootFolders;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
|
|
@ -59,6 +60,13 @@ private void GivenAuthorFolderExists()
|
|||
.Returns(true);
|
||||
}
|
||||
|
||||
private void GivenNonCalibreRootFolder()
|
||||
{
|
||||
Mocker.GetMock<IRootFolderService>()
|
||||
.Setup(x => x.GetBestRootFolder(It.IsAny<string>()))
|
||||
.Returns(new RootFolder());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_throw_if_root_folder_does_not_exist()
|
||||
{
|
||||
|
|
@ -102,6 +110,7 @@ public void should_delete_from_db_if_track_file_does_not_exist()
|
|||
[Test]
|
||||
public void should_delete_from_disk_and_db_if_track_file_exists()
|
||||
{
|
||||
GivenNonCalibreRootFolder();
|
||||
GivenRootFolderExists();
|
||||
GivenRootFolderHasFolders();
|
||||
GivenAuthorFolderExists();
|
||||
|
|
@ -119,6 +128,7 @@ public void should_delete_from_disk_and_db_if_track_file_exists()
|
|||
[Test]
|
||||
public void should_handle_error_deleting_track_file()
|
||||
{
|
||||
GivenNonCalibreRootFolder();
|
||||
GivenRootFolderExists();
|
||||
GivenRootFolderHasFolders();
|
||||
GivenAuthorFolderExists();
|
||||
|
|
|
|||
Loading…
Reference in a new issue