Fixed root folder integration test

This commit is contained in:
Mark McDowall 2014-02-16 09:05:19 -08:00
parent 77b83b521e
commit 207ffd1e5a
2 changed files with 6 additions and 2 deletions

View File

@ -9,8 +9,10 @@ namespace NzbDrone.Api.Config
{
public DownloadClientConfigModule(IConfigService configService, RootFolderValidator rootFolderValidator, PathExistsValidator pathExistsValidator)
: base(configService)
{
{
SharedValidator.RuleFor(c => c.DownloadedEpisodesFolder)
.Cascade(CascadeMode.StopOnFirstFailure)
.IsValidPath()
.SetValidator(rootFolderValidator)
.SetValidator(pathExistsValidator)
.When(c => !String.IsNullOrWhiteSpace(c.DownloadedEpisodesFolder));

View File

@ -27,7 +27,9 @@ namespace NzbDrone.Api.RootFolders
CreateResource = CreateRootFolder;
DeleteResource = DeleteFolder;
SharedValidator.RuleFor(c => c.Path).IsValidPath()
SharedValidator.RuleFor(c => c.Path)
.Cascade(CascadeMode.StopOnFirstFailure)
.IsValidPath()
.SetValidator(rootFolderValidator)
.SetValidator(pathExistsValidator)
.SetValidator(droneFactoryValidator);