mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 08:12:28 +00:00
Refactored the selection tracking to be in the document now
Filtering should work reliably now. No "sticking" of entries Fixed #42. Deleted entries now result in desolation.
This commit is contained in:
33
MacPassTests/KPKLegacyLoadingTest.m
Normal file
33
MacPassTests/KPKLegacyLoadingTest.m
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// KPKTreeLoadingTest.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 20.07.13.
|
||||
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KPKLegacyLoadingTest.h"
|
||||
#import "KPKTreeCryptor.h"
|
||||
#import "KPKPassword.h"
|
||||
|
||||
@implementation KPKLegacyLoadingTest
|
||||
|
||||
- (void)setUp {
|
||||
NSBundle *myBundle = [NSBundle bundleForClass:[self class]];
|
||||
NSURL *url = [myBundle URLForResource:@"Test_Password_1234" withExtension:@"kdb"];
|
||||
_data = [NSData dataWithContentsOfURL:url];
|
||||
_password = [[KPKPassword alloc] initWithPassword:@"1234" key:nil];
|
||||
}
|
||||
|
||||
- (void)tearDown {
|
||||
_data = nil;
|
||||
_password = nil;
|
||||
}
|
||||
|
||||
- (void)testLoading {
|
||||
KPKTreeCryptor *cryptor = [KPKTreeCryptor treeCryptorWithData:_data password:_password];
|
||||
KPKTree *tree = [cryptor decryptTree:NULL];
|
||||
STAssertNotNil(tree, @"Loading should result in a tree object");
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user