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

@@ -60,7 +60,7 @@
MPDocument *document = [windowController document];
if(document) {
BOOL isOk = NO;
if(document.isDecrypted) {
if(document.decrypted) {
// TODO: Fix unlocking to actually test
BOOL noPassword = !document.password && [[self.passwordTextField stringValue] length] == 0;
BOOL passwordOk = [document.password isEqualToString:[self.passwordTextField stringValue]];
@@ -69,7 +69,7 @@
isOk = (noPassword || passwordOk) && (noKey || keyOk);
}
else {
isOk = [document decryptWithPassword:[self.passwordTextField stringValue] keyFileURL:[self.keyPathControl URL]];
isOk = [document unlockWithPassword:[self.passwordTextField stringValue] keyFileURL:[self.keyPathControl URL]];
}
if(!isOk) {
[self _showError];