We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 198b079 commit d303f72Copy full SHA for d303f72
SimpleKeychainTests/SimpleKeychainSpec.swift
@@ -131,11 +131,15 @@ class SimpleKeychainTests: XCTestCase {
131
}
132
133
func testRetrievingNonExistingStringItem() {
134
- XCTAssertThrowsError(try sut.string(forKey: "SHOULDNOTEXIST"))
+ XCTAssertThrowsError(try sut.string(forKey: "SHOULDNOTEXIST")) { error in
135
+ XCTAssertEqual(error as? SimpleKeychainError, .itemNotFound)
136
+ }
137
138
139
func testRetrievingNonExistingDataItem() {
- XCTAssertThrowsError(try sut.data(forKey: "SHOULDNOTEXIST"))
140
+ XCTAssertThrowsError(try sut.data(forKey: "SHOULDNOTEXIST")) { error in
141
142
143
144
145
func testRetrievingStringItemThatCannotBeDecoded() {
0 commit comments