IOSAD-61 testRevoke IOSAD-61
authorDirk Zimmermann <dirk@pep-project.org>
Mon, 06 Nov 2017 10:15:54 +0100
branchIOSAD-61
changeset 3407dfbbd6b92e8
parent 339 0791cd51a653
child 341 157bd9f2c973
IOSAD-61 testRevoke
pEpObjCTests/iOSTests.m
     1.1 --- a/pEpObjCTests/iOSTests.m	Mon Nov 06 10:15:36 2017 +0100
     1.2 +++ b/pEpObjCTests/iOSTests.m	Mon Nov 06 10:15:54 2017 +0100
     1.3 @@ -756,22 +756,23 @@
     1.4      // pEp Test Alice (test key don't use) <pep.test.alice@pep-project.org>
     1.5      // 4ABE3AAF59AC32CFE4F86500A9411D176FF00E97
     1.6      [self importBundledKey:@"6FF00E97_sec.asc"];
     1.7 +    NSString *fpr = @"4ABE3AAF59AC32CFE4F86500A9411D176FF00E97";
     1.8      
     1.9      PEPIdentity *identAlice = [[PEPIdentity alloc]
    1.10                                 initWithAddress:@"pep.test.alice@pep-project.org"
    1.11                                 userID:s_userID
    1.12                                 userName:@"pEp Test Alice"
    1.13 -                               fingerPrint:@"4ABE3AAF59AC32CFE4F86500A9411D176FF00E97"];
    1.14 +                               fingerPrint:fpr];
    1.15  
    1.16      [session mySelf:identAlice];
    1.17  
    1.18 -    NSMutableDictionary *identAlice2 = [[identAlice dictionary] mutableCopy];
    1.19 +    PEPIdentity *identAlice2 = [identAlice mutableCopy];
    1.20      
    1.21      // This will revoke key
    1.22 -    [session keyMistrusted:identAlice2];
    1.23 +    [session keyMistrusted:(NSMutableDictionary *) identAlice2];
    1.24      
    1.25      // Check fingerprint is different
    1.26 -    XCTAssertNotEqual(identAlice2[kPepFingerprint], @"4ABE3AAF59AC32CFE4F86500A9411D176FF00E97");
    1.27 +    XCTAssertNotEqualObjects(identAlice2.fingerPrint, fpr);
    1.28  
    1.29      [self pEpCleanUp];
    1.30  }