mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 00:02:28 +00:00
Updated submodule
Updated writing test to actually test something
This commit is contained in:
@@ -19,7 +19,16 @@
|
||||
KPKTree *tree = [[KPKTree alloc] initWithData:data password:password error:&error];
|
||||
error = nil;
|
||||
NSData *saveData = [tree encryptWithPassword:password forVersion:KPKXmlVersion error:&error];
|
||||
//[saveData writeToFile:@"CustomIcon_Password_1234_save.kdbx" atomically:YES];
|
||||
STAssertNotNil(saveData, @"Serialization should yield data");
|
||||
NSString *tempFile = [NSTemporaryDirectory() stringByAppendingString:@"CustomIcon_Password_1234_save.kdbx"];
|
||||
NSLog(@"Saved file to %@", tempFile);
|
||||
[saveData writeToFile:tempFile atomically:YES];
|
||||
|
||||
error = nil;
|
||||
NSURL *url = [NSURL fileURLWithPath:tempFile];
|
||||
KPKTree *reloadedTree = [[KPKTree alloc] initWithContentsOfUrl:url password:password error:&error];
|
||||
STAssertNotNil(reloadedTree, @"Reloaded tree should not be nil");
|
||||
re
|
||||
}
|
||||
|
||||
- (NSData *)_loadTestDataBase:(NSString *)name extension:(NSString *)extension {
|
||||
|
||||
Reference in New Issue
Block a user