mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
NzbDrone Update no longer opens console/browser.
This commit is contained in:
parent
46c093559e
commit
34f3ee6b4b
18 changed files with 137 additions and 85 deletions
|
@ -1,9 +1,11 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Test.Common;
|
||||
using NzbDrone.Update.UpdateEngine;
|
||||
|
||||
|
@ -26,13 +28,16 @@ namespace NzbDrone.Update.Test
|
|||
[Test]
|
||||
public void should_start_console_if_app_type_was_serivce_but_start_failed_because_of_permissions()
|
||||
{
|
||||
string targetFolder = "c:\\NzbDrone\\";
|
||||
const string targetFolder = "c:\\NzbDrone\\";
|
||||
|
||||
Mocker.GetMock<Common.IServiceProvider>().Setup(c => c.Start(ServiceProvider.NZBDRONE_SERVICE_NAME)).Throws(new InvalidOperationException());
|
||||
|
||||
Subject.Start(AppType.Service, targetFolder);
|
||||
|
||||
Mocker.GetMock<IProcessProvider>().Verify(c => c.Start("c:\\NzbDrone\\NzbDrone.Console.exe"), Times.Once());
|
||||
Mocker.GetMock<IProcessProvider>().Verify(c => c.Start(It.Is<ProcessStartInfo>(s =>
|
||||
s.FileName == "c:\\NzbDrone\\NzbDrone.Console.exe" &&
|
||||
s.Arguments == StartupArguments.NO_BROWSER
|
||||
)), Times.Once());
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue