mirror of
https://github.com/zhigang1992/UICKeyChainStore.git
synced 2026-01-12 22:53:17 +08:00
Merge pull request #48 from kishikawakatsumi/label
Add label and comment test
This commit is contained in:
@@ -980,4 +980,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