Duplicated root folders are now blocked.

This commit is contained in:
kay.one 2012-01-18 21:04:55 -08:00
commit d967d4198c
3 changed files with 21 additions and 15 deletions

View file

@ -92,7 +92,6 @@ namespace NzbDrone.Core.Test.ProviderTests
}
[Test]
public void None_existing_folder_returns_empty_list()
{
@ -123,5 +122,16 @@ namespace NzbDrone.Core.Test.ProviderTests
);
}
[Test]
public void adding_duplicated_root_folder_should_throw()
{
WithRealDb();
//Act
var rootDirProvider = Mocker.Resolve<RootDirProvider>();
rootDirProvider.Add(new RootDir { Path = @"C:\TV" });
Assert.Throws<InvalidOperationException>(() => rootDirProvider.Add(new RootDir { Path = @"C:\TV" }));
}
}
}