mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
You can no longer add root folders that don't already exist.
This commit is contained in:
+20
-2
@@ -1,5 +1,5 @@
|
||||
// ReSharper disable InconsistentNaming
|
||||
using System;
|
||||
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
@@ -9,7 +9,7 @@ using NzbDrone.Test.Common;
|
||||
namespace NzbDrone.Common.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class DiskProviderTests : TestBase
|
||||
public class DiskProviderFixture : TestBase
|
||||
{
|
||||
DirectoryInfo BinFolder;
|
||||
DirectoryInfo BinFolderCopy;
|
||||
@@ -34,6 +34,24 @@ namespace NzbDrone.Common.Test
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void directory_exist_should_be_able_to_find_existing_folder()
|
||||
{
|
||||
Mocker.Resolve<DiskProvider>().FolderExists(TempFolder).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void directory_exist_should_be_able_to_find_existing_unc_share()
|
||||
{
|
||||
Mocker.Resolve<DiskProvider>().FolderExists(@"\\localhost\c$").Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void directory_exist_should_not_be_able_to_find_none_existing_folder()
|
||||
{
|
||||
Mocker.Resolve<DiskProvider>().FolderExists(@"C:\ThisBetterNotExist\").Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void moveFile_should_overwrite_existing_file()
|
||||
{
|
||||
@@ -65,7 +65,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="ConfigFileProviderTest.cs" />
|
||||
<Compile Include="PathExtentionFixture.cs" />
|
||||
<Compile Include="DiskProviderTests.cs" />
|
||||
<Compile Include="DiskProviderFixture.cs" />
|
||||
<Compile Include="EnviromentProviderTest.cs" />
|
||||
<Compile Include="ProcessProviderTests.cs" />
|
||||
<Compile Include="ServiceProviderTests.cs" />
|
||||
|
||||
Reference in New Issue
Block a user