Skip to content

Commit

Permalink
Fixed Swiftlint build phase on M1 with new Homebrew installation. Add…
Browse files Browse the repository at this point in the history
…ed a test for PPPCServices loading. jamf#105
  • Loading branch information
macblazer committed Jan 27, 2022
1 parent 61bf37c commit d65398f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PPPC Utility.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\n\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
12 changes: 12 additions & 0 deletions PPPC UtilityTests/ModelTests/PPPCServicesManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ class PPPCServicesManagerTests: XCTestCase {
XCTAssertEqual(actual, "Allows specified apps access to files on removable volumes.\n\nMDM Key: SystemPolicyRemovableVolumes")
}

func testCameraIsDenyOnly() throws {
// given
let services = PPPCServicesManager()
let service = try XCTUnwrap(services.allServices["Camera"])

// when
let actual = try XCTUnwrap(service.denyOnly)

// then
XCTAssertTrue(actual)
}

func testScreenCaptureAllowsStandardUsers() throws {
// given
let services = PPPCServicesManager()
Expand Down

0 comments on commit d65398f

Please sign in to comment.