mirror of
https://github.com/Readarr/Readarr
synced 2026-02-20 13:42:07 +01:00
Fixed broken tests
(cherry picked from commit 16156192c5f1abd929bcd825186b9f153507a46e)
This commit is contained in:
parent
0ffc44f3da
commit
d822523394
4 changed files with 15 additions and 4 deletions
|
|
@ -37,7 +37,9 @@ public void Setup()
|
|||
_filePath = (@"c:\blackhole\torrent\" + _title + ".torrent").AsOsAgnostic();
|
||||
|
||||
_downloadClientItem = Builder<DownloadClientItem>
|
||||
.CreateNew().With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
||||
.CreateNew()
|
||||
.With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
||||
.With(d => d.OutputPath = new OsPath(Path.Combine(_completedDownloadFolder, _title)))
|
||||
.Build();
|
||||
|
||||
Mocker.SetConstant<IScanWatchFolder>(Mocker.Resolve<ScanWatchFolder>());
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ public void Setup()
|
|||
_filePath = (@"c:\blackhole\nzb\" + _title + ".nzb").AsOsAgnostic();
|
||||
|
||||
_downloadClientItem = Builder<DownloadClientItem>
|
||||
.CreateNew().With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
||||
.CreateNew()
|
||||
.With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
||||
.With(d => d.OutputPath = new OsPath(Path.Combine(_completedDownloadFolder, _title)))
|
||||
.Build();
|
||||
|
||||
Mocker.SetConstant<IScanWatchFolder>(Mocker.Resolve<ScanWatchFolder>());
|
||||
|
|
|
|||
|
|
@ -77,7 +77,9 @@ public void Setup()
|
|||
};
|
||||
|
||||
_downloadClientItem = Builder<DownloadClientItem>
|
||||
.CreateNew().With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
||||
.CreateNew()
|
||||
.With(d => d.DownloadId = "_Droned.S01E01.Pilot.1080p.WEB-DL-DRONE_0")
|
||||
.With(d => d.OutputPath = new OsPath("/remote/mount/tv/Droned.S01E01.Pilot.1080p.WEB-DL-DRONE".AsOsAgnostic()))
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<INzbgetProxy>()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using FizzWare.NBuilder;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
|
|
@ -103,7 +104,9 @@ public void Setup()
|
|||
};
|
||||
|
||||
_downloadClientItem = Builder<DownloadClientItem>
|
||||
.CreateNew().With(d => d.DownloadId = _completed.Items.First().Id)
|
||||
.CreateNew()
|
||||
.With(d => d.Status = DownloadItemStatus.Completed)
|
||||
.With(d => d.DownloadId = _completed.Items.First().Id)
|
||||
.Build();
|
||||
|
||||
Mocker.GetMock<ISabnzbdProxy>()
|
||||
|
|
@ -589,6 +592,7 @@ public void should_test_failed_if_tv_sorting_default_category()
|
|||
public void should_remove_output_path_folder_when_deleting_a_completed_item_and_delete_data_is_true()
|
||||
{
|
||||
var path = @"C:\Test\Series.Title.S01E01".AsOsAgnostic();
|
||||
_downloadClientItem.OutputPath = new OsPath(path);
|
||||
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(s => s.FolderExists(path))
|
||||
|
|
@ -612,6 +616,7 @@ public void should_remove_output_path_folder_when_deleting_a_completed_item_and_
|
|||
public void should_remove_output_path_file_when_deleting_a_completed_item_and_delete_data_is_true()
|
||||
{
|
||||
var path = @"C:\Test\Series.Title.S01E01.mkv".AsOsAgnostic();
|
||||
_downloadClientItem.OutputPath = new OsPath(path);
|
||||
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(s => s.FolderExists(path))
|
||||
|
|
|
|||
Loading…
Reference in a new issue