Skip to content

Commit c43cd85

Browse files
authored
test: migrated from Quick & Nimble to use XCTest to remove dependency on third party packages (#213)
2 parents f875a44 + d303f72 commit c43cd85

File tree

9 files changed

+625
-769
lines changed

9 files changed

+625
-769
lines changed

.github/actions/test/action.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,6 @@ runs:
2424
run: xcodebuild -version | tee .xcode-version
2525
shell: bash
2626

27-
- id: restore-carthage-cache
28-
name: Restore Carthage cache
29-
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
30-
with:
31-
path: Carthage
32-
key: carthage-${{ inputs.platform }}-${{ hashFiles('Cartfile.resolved') }}-${{ hashFiles('.xcode-version') }}-v1
33-
34-
- name: Install dependencies
35-
if: steps.restore-carthage-cache.outputs.cache-hit != 'true'
36-
run: carthage bootstrap --platform ${{ inputs.platform }} --use-xcframeworks --no-use-binaries --cache-builds
37-
shell: bash
38-
3927
- name: Run tests
4028
uses: mxcl/xcodebuild@6e60022a0cbe8c89278be2dd1773a2f68e7c5c87
4129
with:

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@
55
66
## Environment setup
77

8-
We use [Carthage](https://github.com/Carthage/Carthage) to manage SimpleKeychain's dependencies.
9-
108
1. Clone this repository and enter its root directory.
11-
2. Run `carthage bootstrap --use-xcframeworks` to fetch and build the dependencies.
12-
3. Open `SimpleKeychain.xcodeproj` in Xcode.
9+
2. Open `SimpleKeychain.xcodeproj` in Xcode.

Cartfile.private

Lines changed: 0 additions & 2 deletions
This file was deleted.

Cartfile.resolved

Lines changed: 0 additions & 2 deletions
This file was deleted.

Package.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
// swift-tools-version:5.7
2-
32
import PackageDescription
43

54
let package = Package(
65
name: "SimpleKeychain",
76
platforms: [.iOS(.v13), .macOS(.v11), .tvOS(.v13), .watchOS(.v7)],
87
products: [.library(name: "SimpleKeychain", targets: ["SimpleKeychain"])],
9-
dependencies: [
10-
.package(url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "7.0.0")),
11-
.package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "12.0.0")),
12-
],
138
targets: [
149
.target(
1510
name: "SimpleKeychain",
@@ -20,8 +15,6 @@ let package = Package(
2015
name: "SimpleKeychainTests",
2116
dependencies: [
2217
"SimpleKeychain",
23-
.product(name: "Quick", package: "Quick"),
24-
.product(name: "Nimble", package: "Nimble"),
2518
],
2619
path: "SimpleKeychainTests",
2720
exclude: ["Info.plist"])

SimpleKeychain.xcodeproj/project.pbxproj

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
5C737B34285AB9B100B4BB25 /* SimpleKeychainErrorSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C737B2F285AB57A00B4BB25 /* SimpleKeychainErrorSpec.swift */; };
2121
5C737B35285AB9B100B4BB25 /* SimpleKeychainErrorSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C737B2F285AB57A00B4BB25 /* SimpleKeychainErrorSpec.swift */; };
2222
5C737B36285AB9B100B4BB25 /* SimpleKeychainErrorSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C737B2F285AB57A00B4BB25 /* SimpleKeychainErrorSpec.swift */; };
23-
5C737B4F285ACC9F00B4BB25 /* Nimble.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9CA1126FD42B0005A75FA /* Nimble.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
24-
5C737B50285ACC9F00B4BB25 /* Quick.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9CA1026FD42B0005A75FA /* Quick.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2523
5C840112285AFF7B00689C01 /* Accessibility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C840111285AFF7B00689C01 /* Accessibility.swift */; };
2624
5C840113285AFF7B00689C01 /* Accessibility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C840111285AFF7B00689C01 /* Accessibility.swift */; };
2725
5C840114285AFF7B00689C01 /* Accessibility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C840111285AFF7B00689C01 /* Accessibility.swift */; };
@@ -32,16 +30,6 @@
3230
5CDF405B2852D88C003840E6 /* SimpleKeychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CDF40592852D88C003840E6 /* SimpleKeychain.swift */; };
3331
5CDF405C2852D88C003840E6 /* SimpleKeychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CDF40592852D88C003840E6 /* SimpleKeychain.swift */; };
3432
5CDF405D2852D88C003840E6 /* SimpleKeychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CDF40592852D88C003840E6 /* SimpleKeychain.swift */; };
35-
5CE9CA1226FD42B0005A75FA /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9CA1026FD42B0005A75FA /* Quick.xcframework */; };
36-
5CE9CA1326FD42B0005A75FA /* Nimble.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9CA1126FD42B0005A75FA /* Nimble.xcframework */; };
37-
5CE9CA1626FD42F4005A75FA /* Nimble.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9CA1126FD42B0005A75FA /* Nimble.xcframework */; };
38-
5CE9CA1726FD42F4005A75FA /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9CA1026FD42B0005A75FA /* Quick.xcframework */; };
39-
5CE9CA1826FD42FA005A75FA /* Nimble.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9CA1126FD42B0005A75FA /* Nimble.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
40-
5CE9CA1926FD42FA005A75FA /* Quick.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9CA1026FD42B0005A75FA /* Quick.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
41-
5CE9CA1A26FD430F005A75FA /* Nimble.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9CA1126FD42B0005A75FA /* Nimble.xcframework */; };
42-
5CE9CA1B26FD430F005A75FA /* Quick.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5CE9CA1026FD42B0005A75FA /* Quick.xcframework */; };
43-
5CE9CA1C26FD4316005A75FA /* Nimble.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9CA1126FD42B0005A75FA /* Nimble.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
44-
5CE9CA1D26FD4316005A75FA /* Quick.xcframework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 5CE9CA1026FD42B0005A75FA /* Quick.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
4533
5CE9CA2126FD43F5005A75FA /* SimpleKeychain.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B108AB81EA637B100ED4DD2 /* SimpleKeychain.framework */; };
4634
5CEB577B285BCE7E00A32A80 /* AccessibilitySpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CEB577A285BCE7E00A32A80 /* AccessibilitySpec.swift */; };
4735
5CEB577C285BCE7E00A32A80 /* AccessibilitySpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CEB577A285BCE7E00A32A80 /* AccessibilitySpec.swift */; };
@@ -92,28 +80,6 @@
9280
/* End PBXContainerItemProxy section */
9381

9482
/* Begin PBXCopyFilesBuildPhase section */
95-
5B062A3A1EA63F6100827E79 /* CopyFiles */ = {
96-
isa = PBXCopyFilesBuildPhase;
97-
buildActionMask = 2147483647;
98-
dstPath = "";
99-
dstSubfolderSpec = 10;
100-
files = (
101-
5CE9CA1C26FD4316005A75FA /* Nimble.xcframework in CopyFiles */,
102-
5CE9CA1D26FD4316005A75FA /* Quick.xcframework in CopyFiles */,
103-
);
104-
runOnlyForDeploymentPostprocessing = 0;
105-
};
106-
5C737B4E285ACC9200B4BB25 /* CopyFiles */ = {
107-
isa = PBXCopyFilesBuildPhase;
108-
buildActionMask = 2147483647;
109-
dstPath = "";
110-
dstSubfolderSpec = 10;
111-
files = (
112-
5C737B4F285ACC9F00B4BB25 /* Nimble.xcframework in CopyFiles */,
113-
5C737B50285ACC9F00B4BB25 /* Quick.xcframework in CopyFiles */,
114-
);
115-
runOnlyForDeploymentPostprocessing = 0;
116-
};
11783
5CAF69A826FE57A90045266B /* Copy Files */ = {
11884
isa = PBXCopyFilesBuildPhase;
11985
buildActionMask = 2147483647;
@@ -125,17 +91,6 @@
12591
name = "Copy Files";
12692
runOnlyForDeploymentPostprocessing = 0;
12793
};
128-
5F4D279C1BCEA6A7003C27B3 /* CopyFiles */ = {
129-
isa = PBXCopyFilesBuildPhase;
130-
buildActionMask = 2147483647;
131-
dstPath = "";
132-
dstSubfolderSpec = 10;
133-
files = (
134-
5CE9CA1826FD42FA005A75FA /* Nimble.xcframework in CopyFiles */,
135-
5CE9CA1926FD42FA005A75FA /* Quick.xcframework in CopyFiles */,
136-
);
137-
runOnlyForDeploymentPostprocessing = 0;
138-
};
13994
/* End PBXCopyFilesBuildPhase section */
14095

14196
/* Begin PBXFileReference section */
@@ -155,8 +110,6 @@
155110
5C737B2F285AB57A00B4BB25 /* SimpleKeychainErrorSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleKeychainErrorSpec.swift; sourceTree = "<group>"; };
156111
5C840111285AFF7B00689C01 /* Accessibility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Accessibility.swift; sourceTree = "<group>"; };
157112
5CDF40592852D88C003840E6 /* SimpleKeychain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleKeychain.swift; sourceTree = "<group>"; };
158-
5CE9CA1026FD42B0005A75FA /* Quick.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Quick.xcframework; path = Carthage/Build/Quick.xcframework; sourceTree = SOURCE_ROOT; };
159-
5CE9CA1126FD42B0005A75FA /* Nimble.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Nimble.xcframework; path = Carthage/Build/Nimble.xcframework; sourceTree = SOURCE_ROOT; };
160113
5CEB577A285BCE7E00A32A80 /* AccessibilitySpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessibilitySpec.swift; sourceTree = "<group>"; };
161114
5F4D27651BCE995C003C27B3 /* SimpleKeychainSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SimpleKeychainSpec.swift; sourceTree = "<group>"; };
162115
5F4D277B1BCE99DF003C27B3 /* SimpleKeychainTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SimpleKeychainTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -177,8 +130,6 @@
177130
isa = PBXFrameworksBuildPhase;
178131
buildActionMask = 2147483647;
179132
files = (
180-
5CE9CA1A26FD430F005A75FA /* Nimble.xcframework in Frameworks */,
181-
5CE9CA1B26FD430F005A75FA /* Quick.xcframework in Frameworks */,
182133
);
183134
runOnlyForDeploymentPostprocessing = 0;
184135
};
@@ -208,17 +159,13 @@
208159
isa = PBXFrameworksBuildPhase;
209160
buildActionMask = 2147483647;
210161
files = (
211-
5CE9CA1326FD42B0005A75FA /* Nimble.xcframework in Frameworks */,
212-
5CE9CA1226FD42B0005A75FA /* Quick.xcframework in Frameworks */,
213162
);
214163
runOnlyForDeploymentPostprocessing = 0;
215164
};
216165
5F4D278C1BCEA69E003C27B3 /* Frameworks */ = {
217166
isa = PBXFrameworksBuildPhase;
218167
buildActionMask = 2147483647;
219168
files = (
220-
5CE9CA1626FD42F4005A75FA /* Nimble.xcframework in Frameworks */,
221-
5CE9CA1726FD42F4005A75FA /* Quick.xcframework in Frameworks */,
222169
);
223170
runOnlyForDeploymentPostprocessing = 0;
224171
};
@@ -264,8 +211,6 @@
264211
5F51D71D1BCDC4D400613162 /* Frameworks */ = {
265212
isa = PBXGroup;
266213
children = (
267-
5CE9CA1126FD42B0005A75FA /* Nimble.xcframework */,
268-
5CE9CA1026FD42B0005A75FA /* Quick.xcframework */,
269214
);
270215
name = Frameworks;
271216
path = SimpleKeychain;
@@ -398,7 +343,6 @@
398343
5B0D47551EA63C74009FF1BF /* Sources */,
399344
5B0D47561EA63C74009FF1BF /* Frameworks */,
400345
5B0D47571EA63C74009FF1BF /* Resources */,
401-
5B062A3A1EA63F6100827E79 /* CopyFiles */,
402346
);
403347
buildRules = (
404348
);
@@ -473,7 +417,6 @@
473417
5F4D27771BCE99DF003C27B3 /* Sources */,
474418
5F4D27781BCE99DF003C27B3 /* Frameworks */,
475419
5F4D27791BCE99DF003C27B3 /* Resources */,
476-
5C737B4E285ACC9200B4BB25 /* CopyFiles */,
477420
);
478421
buildRules = (
479422
);
@@ -493,7 +436,6 @@
493436
5F4D278B1BCEA69E003C27B3 /* Sources */,
494437
5F4D278C1BCEA69E003C27B3 /* Frameworks */,
495438
5F4D278D1BCEA69E003C27B3 /* Resources */,
496-
5F4D279C1BCEA6A7003C27B3 /* CopyFiles */,
497439
);
498440
buildRules = (
499441
);
@@ -937,7 +879,6 @@
937879
5B0D47621EA63C74009FF1BF /* Debug */ = {
938880
isa = XCBuildConfiguration;
939881
buildSettings = {
940-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
941882
CLANG_ANALYZER_NONNULL = YES;
942883
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
943884
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@@ -965,7 +906,6 @@
965906
5B0D47631EA63C74009FF1BF /* Release */ = {
966907
isa = XCBuildConfiguration;
967908
buildSettings = {
968-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
969909
CLANG_ANALYZER_NONNULL = YES;
970910
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
971911
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@@ -1171,7 +1111,6 @@
11711111
5F4D27831BCE99E0003C27B3 /* Debug */ = {
11721112
isa = XCBuildConfiguration;
11731113
buildSettings = {
1174-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
11751114
BUNDLE_LOADER = "$(TEST_HOST)";
11761115
DEBUG_INFORMATION_FORMAT = dwarf;
11771116
INFOPLIST_FILE = SimpleKeychainTests/Info.plist;
@@ -1192,7 +1131,6 @@
11921131
5F4D27841BCE99E0003C27B3 /* Release */ = {
11931132
isa = XCBuildConfiguration;
11941133
buildSettings = {
1195-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
11961134
BUNDLE_LOADER = "$(TEST_HOST)";
11971135
INFOPLIST_FILE = SimpleKeychainTests/Info.plist;
11981136
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
Lines changed: 58 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,63 @@
11
import Security
2-
import Nimble
3-
import Quick
2+
import XCTest
43
import SimpleKeychain
54

6-
class AccessibilitySpec: QuickSpec {
7-
override class func spec() {
8-
describe("raw representable") {
9-
context("from raw value to case") {
10-
it("should map kSecAttrAccessibleWhenUnlocked") {
11-
let sut = Accessibility(rawValue: kSecAttrAccessibleWhenUnlocked)
12-
expect(sut) == Accessibility.whenUnlocked
13-
}
14-
15-
it("should map kSecAttrAccessibleWhenUnlockedThisDeviceOnly") {
16-
let sut = Accessibility(rawValue: kSecAttrAccessibleWhenUnlockedThisDeviceOnly)
17-
expect(sut) == Accessibility.whenUnlockedThisDeviceOnly
18-
}
19-
20-
it("should map kSecAttrAccessibleAfterFirstUnlock") {
21-
let sut = Accessibility(rawValue: kSecAttrAccessibleAfterFirstUnlock)
22-
expect(sut) == Accessibility.afterFirstUnlock
23-
}
24-
25-
it("should map kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly") {
26-
let sut = Accessibility(rawValue: kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly)
27-
expect(sut) == Accessibility.afterFirstUnlockThisDeviceOnly
28-
}
29-
30-
it("should map kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly") {
31-
let sut = Accessibility(rawValue: kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly)
32-
expect(sut) == Accessibility.whenPasscodeSetThisDeviceOnly
33-
}
34-
35-
it("should map unknown values") {
36-
let sut = Accessibility(rawValue: "foo" as CFString)
37-
expect(sut) == Accessibility.afterFirstUnlock
38-
}
39-
}
40-
41-
context("from case to raw value") {
42-
it("should map whenUnlocked") {
43-
let sut = Accessibility.whenUnlocked.rawValue as String
44-
expect(sut) == (kSecAttrAccessibleWhenUnlocked as String)
45-
}
46-
47-
it("should map whenUnlockedThisDeviceOnly") {
48-
let sut = Accessibility.whenUnlockedThisDeviceOnly.rawValue as String
49-
expect(sut) == (kSecAttrAccessibleWhenUnlockedThisDeviceOnly as String)
50-
}
51-
52-
it("should map afterFirstUnlock") {
53-
let sut = Accessibility.afterFirstUnlock.rawValue as String
54-
expect(sut) == (kSecAttrAccessibleAfterFirstUnlock as String)
55-
}
56-
57-
it("should map afterFirstUnlockThisDeviceOnly") {
58-
let sut = Accessibility.afterFirstUnlockThisDeviceOnly.rawValue as String
59-
expect(sut) == (kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly as String)
60-
}
61-
62-
it("should map whenPasscodeSetThisDeviceOnly") {
63-
let sut = Accessibility.whenPasscodeSetThisDeviceOnly.rawValue as String
64-
expect(sut) == (kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly as String)
65-
}
66-
67-
it("should map whenPasscodeSetThisDeviceOnly") {
68-
let sut = Accessibility.whenPasscodeSetThisDeviceOnly.rawValue as String
69-
expect(sut) == (kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly as String)
70-
}
71-
}
72-
}
5+
class AccessibilitySpec: XCTestCase {
6+
7+
// Test from raw value to case
8+
func testKSecAttrAccessibleWhenUnlocked() {
9+
let sut = Accessibility(rawValue: kSecAttrAccessibleWhenUnlocked)
10+
XCTAssertEqual(sut, Accessibility.whenUnlocked)
11+
}
12+
13+
func testKSecAttrAccessibleWhenUnlockedThisDeviceOnly() {
14+
let sut = Accessibility(rawValue: kSecAttrAccessibleWhenUnlockedThisDeviceOnly)
15+
XCTAssertEqual(sut, Accessibility.whenUnlockedThisDeviceOnly)
16+
}
17+
18+
func testKSecAttrAccessibleAfterFirstUnlock() {
19+
let sut = Accessibility(rawValue: kSecAttrAccessibleAfterFirstUnlock)
20+
XCTAssertEqual(sut, Accessibility.afterFirstUnlock)
21+
}
22+
23+
func testKSecAttrAccessibleAfterFirstUnlockThisDeviceOnly() {
24+
let sut = Accessibility(rawValue: kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly)
25+
XCTAssertEqual(sut, Accessibility.afterFirstUnlockThisDeviceOnly)
26+
}
27+
28+
func testKSecAttrAccessibleWhenPasscodeSetThisDeviceOnly() {
29+
let sut = Accessibility(rawValue: kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly)
30+
XCTAssertEqual(sut, Accessibility.whenPasscodeSetThisDeviceOnly)
31+
}
32+
33+
func testUnknownValues() {
34+
let sut = Accessibility(rawValue: "foo" as CFString)
35+
XCTAssertEqual(sut, Accessibility.afterFirstUnlock)
36+
}
37+
38+
// Test from case to raw value
39+
func testWhenUnlocked() {
40+
let sut = Accessibility.whenUnlocked.rawValue as String
41+
XCTAssertEqual(sut, kSecAttrAccessibleWhenUnlocked as String)
42+
}
43+
44+
func testWhenUnlockedThisDeviceOnly() {
45+
let sut = Accessibility.whenUnlockedThisDeviceOnly.rawValue as String
46+
XCTAssertEqual(sut, kSecAttrAccessibleWhenUnlockedThisDeviceOnly as String)
47+
}
48+
49+
func testAfterFirstUnlock() {
50+
let sut = Accessibility.afterFirstUnlock.rawValue as String
51+
XCTAssertEqual(sut, kSecAttrAccessibleAfterFirstUnlock as String)
52+
}
53+
54+
func testAfterFirstUnlockThisDeviceOnly() {
55+
let sut = Accessibility.afterFirstUnlockThisDeviceOnly.rawValue as String
56+
XCTAssertEqual(sut, kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly as String)
57+
}
58+
59+
func testWhenPasscodeSetThisDeviceOnly() {
60+
let sut = Accessibility.whenPasscodeSetThisDeviceOnly.rawValue as String
61+
XCTAssertEqual(sut, kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly as String)
7362
}
7463
}

0 commit comments

Comments
 (0)