mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-04 06:38:28 +02:00
fixed sab tests.
This commit is contained in:
parent
5033886b90
commit
a1a5e29c3e
@ -115,6 +115,13 @@ public void Setup()
|
|||||||
.Returns(_fullStatus);
|
.Returns(_fullStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void GivenVersion(string version)
|
||||||
|
{
|
||||||
|
Mocker.GetMock<ISabnzbdProxy>()
|
||||||
|
.Setup(s => s.GetVersion(It.IsAny<SabnzbdSettings>()))
|
||||||
|
.Returns(version);
|
||||||
|
}
|
||||||
|
|
||||||
protected void GivenFailedDownload()
|
protected void GivenFailedDownload()
|
||||||
{
|
{
|
||||||
Mocker.GetMock<ISabnzbdProxy>()
|
Mocker.GetMock<ISabnzbdProxy>()
|
||||||
@ -407,6 +414,7 @@ public void should_return_status_with_outputdir_for_version_lt_2(string rootFold
|
|||||||
_config.Misc.complete_dir = completeDir;
|
_config.Misc.complete_dir = completeDir;
|
||||||
_config.Categories.First().Dir = categoryDir;
|
_config.Categories.First().Dir = categoryDir;
|
||||||
|
|
||||||
|
GivenVersion("1.2.1");
|
||||||
GivenQueue(null);
|
GivenQueue(null);
|
||||||
|
|
||||||
var result = Subject.GetStatus();
|
var result = Subject.GetStatus();
|
||||||
@ -427,6 +435,7 @@ public void should_return_status_with_outputdir_for_version_gte_2(string rootFol
|
|||||||
_config.Misc.complete_dir = completeDir;
|
_config.Misc.complete_dir = completeDir;
|
||||||
_config.Categories.First().Dir = categoryDir;
|
_config.Categories.First().Dir = categoryDir;
|
||||||
|
|
||||||
|
GivenVersion("2.0.0beta1");
|
||||||
GivenQueue(null);
|
GivenQueue(null);
|
||||||
|
|
||||||
var result = Subject.GetStatus();
|
var result = Subject.GetStatus();
|
||||||
|
Loading…
Reference in New Issue
Block a user