mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-28 15:50:50 +02:00
Fix update tests
This commit is contained in:
parent
54dce448a8
commit
0aedafb278
2 changed files with 4 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ public static string CleanFilePath(this string path)
|
|||
|
||||
var info = new FileInfo(path.Trim());
|
||||
|
||||
//UNC
|
||||
// UNC
|
||||
if (OsInfo.IsWindows && info.FullName.StartsWith(@"\\"))
|
||||
{
|
||||
return info.FullName.TrimEnd('/', '\\', ' ');
|
||||
|
|
@ -166,7 +166,7 @@ private static string GetProperCapitalization(DirectoryInfo dirInfo)
|
|||
var parentDirInfo = dirInfo.Parent;
|
||||
if (parentDirInfo == null)
|
||||
{
|
||||
//Drive letter
|
||||
// Drive letter
|
||||
return dirInfo.Name.ToUpper();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public void Setup()
|
|||
.Returns(true);
|
||||
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(v => v.FileExists(It.Is<string>(s => s.EndsWith("Prowlarr.Update.exe"))))
|
||||
.Setup(v => v.FileExists(It.Is<string>(s => s.EndsWith("Prowlarr.Update".ProcessNameToExe()))))
|
||||
.Returns(true);
|
||||
|
||||
_sandboxFolder = Mocker.GetMock<IAppFolderInfo>().Object.GetUpdateSandboxFolder();
|
||||
|
|
@ -165,7 +165,7 @@ public void should_start_update_client_if_updater_exists()
|
|||
public void should_return_with_warning_if_updater_doesnt_exists()
|
||||
{
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(v => v.FileExists(It.Is<string>(s => s.EndsWith("Prowlarr.Update.exe"))))
|
||||
.Setup(v => v.FileExists(It.Is<string>(s => s.EndsWith("Prowlarr.Update".ProcessNameToExe()))))
|
||||
.Returns(false);
|
||||
|
||||
Subject.Execute(new ApplicationUpdateCommand());
|
||||
|
|
|
|||
Loading…
Reference in a new issue