mirror of
https://github.com/zhigang1992/UICKeyChainStore.git
synced 2026-01-12 22:53:17 +08:00
Add label and comment test
This commit is contained in:
@@ -961,4 +961,19 @@
|
||||
XCTAssertNil(username);
|
||||
}
|
||||
|
||||
- (void)testSetLabelAndComment
|
||||
{
|
||||
UICKeyChainStore *store = [UICKeyChainStore keyChainStoreWithService:@"Twitter"];
|
||||
|
||||
[store setString:@"kishikawakatsumi" forKey:@"username" label:@"Label" comment:@"Comment"];
|
||||
|
||||
NSString *username = [store stringForKey:@"username"];
|
||||
XCTAssertEqualObjects(username, @"kishikawakatsumi");
|
||||
|
||||
[store setString:nil forKey:@"username"];
|
||||
|
||||
username = [store stringForKey:@"username"];
|
||||
XCTAssertNil(username);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user