Fixed Tests

Fixed error that lead to trying to create and array with nil object
This commit is contained in:
michael starke
2013-07-13 00:00:51 +02:00
parent 860d6bb21c
commit a31e287ec8
12 changed files with 182 additions and 39 deletions

View File

@@ -97,7 +97,7 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur
[[self window] setDelegate:self];
MPDocument *document = [self document];
if(!document.isDecrypted) {
if(!document.decrypted) {
[self showPasswordInput];
}
else {
@@ -178,7 +178,7 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur
}
SEL itemAction = [theItem action];
if( itemAction == [MPActionHelper actionOfType:MPActionLock]) {
return document.isSecured;
return document.hasPasswordOrKey;
}
if(itemAction == [MPActionHelper actionOfType:MPActionAddEntry]) {
return (nil != _outlineViewController.selectedGroup);
@@ -211,7 +211,7 @@ NSString *const MPCurrentItemChangedNotification = @"com.hicknhack.macpass.MPCur
- (void)lock:(id)sender {
MPDocument *document = [self document];
if(!document.isSecured) {
if(!document.hasPasswordOrKey) {
return; // Document needs a password/keyfile to be lockable
}
if(document.isLocked) {