Skip to content

Commit

Permalink
Even _more_ exhaustive tests around initializer/backing service
Browse files Browse the repository at this point in the history
  • Loading branch information
EricMuller22 committed Mar 30, 2018
1 parent 4369274 commit d02aa1d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Tests/SecureEnclaveTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ class SecureEnclaveTests: XCTestCase
}
}

func test_init_createsCorrectBackingService_sharedAccess() {
let identifier = ValetTests.identifier

SecureEnclaveAccessControl.allValues().forEach { accessControl in
let backingService = SecureEnclaveValet.sharedAccessGroupValet(with: identifier, accessControl: accessControl).service
XCTAssertEqual(backingService, Service.sharedAccessGroup(identifier, .secureEnclave(accessControl)))
}
}

// MARK: Equality

func test_secureEnclaveValetsWithEqualConfiguration_haveEqualPointers()
Expand Down
9 changes: 9 additions & 0 deletions Tests/SinglePromptSecureEnclaveTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ class SinglePromptSecureEnclaveTests: XCTestCase
}
}

func test_init_createsCorrectBackingService_sharedAccess() {
let identifier = ValetTests.identifier

SecureEnclaveAccessControl.allValues().forEach { accessControl in
let backingService = SinglePromptSecureEnclaveValet.sharedAccessGroupValet(with: identifier, accessControl: accessControl).service
XCTAssertEqual(backingService, Service.sharedAccessGroup(identifier, .singlePromptSecureEnclave(accessControl)))
}
}

// MARK: Equality

func test_SinglePromptSecureEnclaveValetsWithEqualConfiguration_haveEqualPointers()
Expand Down

0 comments on commit d02aa1d

Please sign in to comment.