From 150f10ed05f4e8691b7a2f9f32276f5c1e9d69b3 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 24 Jul 2016 23:53:18 -0400 Subject: [PATCH] Update Installer unit test --- Tests/SUInstallerTest.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tests/SUInstallerTest.m b/Tests/SUInstallerTest.m index 1c32e810..50c5f3b4 100644 --- a/Tests/SUInstallerTest.m +++ b/Tests/SUInstallerTest.m @@ -12,6 +12,7 @@ #import "SUInstaller.h" #import "SUInstallerProtocol.h" #import "SUStandardVersionComparator.h" +#import "SUInstallationType.h" #import @interface SUInstallerTest : XCTestCase @@ -39,7 +40,7 @@ if (uid) { NSLog(@"Test must be run as root: sudo xctest -XCTest SUInstallerTest 'Sparkle Unit Tests.xctest'"); - return; // or just comment this line out and enter password when the auth. prompt comes up + return; } NSString *expectedDestination = @"/tmp/sparklepkgtest.app"; @@ -54,7 +55,7 @@ SUHost *host = [[SUHost alloc] initWithBundle:bundle]; NSError *installerError = nil; - id installer = [SUInstaller installerForHost:host updateDirectory:[path stringByDeletingLastPathComponent] allowingInteraction:NO versionComparator:[SUStandardVersionComparator standardVersionComparator] error:&installerError]; + id installer = [SUInstaller installerForHost:host expectedInstallationType:SUInstallationTypeGuidedPackage updateDirectory:[path stringByDeletingLastPathComponent] allowingInteraction:NO versionComparator:[SUStandardVersionComparator standardVersionComparator] error:&installerError]; if (installer == nil) { XCTFail(@"Installer is nil with error: %@", installerError);