mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
added platform based filepath validation.
This commit is contained in:
parent
90fa261a00
commit
2f13832769
3 changed files with 102 additions and 1 deletions
|
@ -142,7 +142,7 @@ namespace NzbDrone.Common.Test
|
|||
if (first.StartsWith("\\"))
|
||||
{
|
||||
//verify the linux equivalent.
|
||||
DiskProvider.PathEquals(first.Replace("\\", "/"), second.Replace("\\", "/")).Should().BeTrue();
|
||||
DiskProvider.PathEquals(first, second).Should().BeTrue();
|
||||
}
|
||||
|
||||
DiskProvider.PathEquals(first, second).Should().BeTrue();
|
||||
|
@ -166,8 +166,11 @@ namespace NzbDrone.Common.Test
|
|||
public void folder_should_return_correct_value_for_last_write()
|
||||
{
|
||||
var appPath = new EnvironmentProvider().WorkingDirectory;
|
||||
|
||||
TestLogger.Info("Path is: {0}", appPath);
|
||||
|
||||
Subject.WriteAllText(Path.Combine(appPath,"newfile.txt"), "");
|
||||
|
||||
Subject.GetLastFolderWrite(appPath).Should().BeOnOrAfter(DateTime.UtcNow.AddMinutes(-10));
|
||||
Subject.GetLastFolderWrite(appPath).Should().BeBefore(DateTime.UtcNow);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue