@@ -17,10 +17,10 @@ extension Keys {
17
17
}
18
18
19
19
private struct TestCodable : Codable , Equatable {
20
- var id : String
20
+ var identifier : String
21
21
var timestamp : Date
22
- init ( id : String , timestamp: Date ) {
23
- self . id = id
22
+ init ( identifier : String , timestamp: Date ) {
23
+ self . identifier = identifier
24
24
self . timestamp = timestamp
25
25
}
26
26
}
@@ -50,16 +50,16 @@ class KeychainSpec: QuickSpec {
50
50
}
51
51
52
52
it ( " should be able to write a codable value to the keychain " ) {
53
- let value = TestCodable ( id : " 123 " ,
53
+ let value = TestCodable ( identifier : " 123 " ,
54
54
timestamp: Date ( timeIntervalSince1970: 2000 ) )
55
55
keychain [ . testKey] = value
56
56
expect ( keychain [ . testKey] ) == value
57
57
}
58
58
59
59
it ( " Should override a codable value to the keychain " ) {
60
- let value1 = TestCodable ( id : " 123 " ,
60
+ let value1 = TestCodable ( identifier : " 123 " ,
61
61
timestamp: Date ( timeIntervalSince1970: 2000 ) )
62
- let value2 = TestCodable ( id : " 456 " ,
62
+ let value2 = TestCodable ( identifier : " 456 " ,
63
63
timestamp: Date ( timeIntervalSince1970: 3000 ) )
64
64
keychain [ . testKey] = value1
65
65
keychain [ . testKey] = value2
@@ -68,7 +68,7 @@ class KeychainSpec: QuickSpec {
68
68
}
69
69
70
70
it ( " should be able to delete a codable value from the keychain " ) {
71
- let value = TestCodable ( id : " 123 " ,
71
+ let value = TestCodable ( identifier : " 123 " ,
72
72
timestamp: Date ( timeIntervalSince1970: 2000 ) )
73
73
keychain [ . testKey] = value
74
74
expect ( keychain [ . testKey] ) . toNot ( beNil ( ) )
0 commit comments