IOSAD-61 testRevoke IOSAD-61
authorDirk Zimmermann <dirk@pep-project.org>
Fri, 03 Nov 2017 13:24:02 +0100
branchIOSAD-61
changeset 3294a32986fcbfa
parent 328 e6f2c52c4e0c
child 330 1badae030648
IOSAD-61 testRevoke
pEpObjCTests/iOSTests.m
     1.1 --- a/pEpObjCTests/iOSTests.m	Fri Nov 03 13:23:44 2017 +0100
     1.2 +++ b/pEpObjCTests/iOSTests.m	Fri Nov 03 13:24:02 2017 +0100
     1.3 @@ -675,20 +675,21 @@
     1.4      // 4ABE3AAF59AC32CFE4F86500A9411D176FF00E97
     1.5      [self importBundledKey:@"6FF00E97_sec.asc"];
     1.6      
     1.7 -    NSMutableDictionary *identAlice = [NSMutableDictionary dictionaryWithObjectsAndKeys:
     1.8 -                                       @"pEp Test Alice", kPepUsername,
     1.9 -                                       @"pep.test.alice@pep-project.org", kPepAddress,
    1.10 -                                       @"23", kPepUserID,
    1.11 -                                       @"4ABE3AAF59AC32CFE4F86500A9411D176FF00E97",kPepFingerprint,
    1.12 -                                       nil];
    1.13 -    
    1.14 +    PEPIdentity *identAlice = [[PEPIdentity alloc]
    1.15 +                               initWithAddress:@"pep.test.alice@pep-project.org"
    1.16 +                               userID:s_userID
    1.17 +                               userName:@"pEp Test Alice"
    1.18 +                               fingerPrint:@"4ABE3AAF59AC32CFE4F86500A9411D176FF00E97"];
    1.19 +
    1.20      [session mySelf:identAlice];
    1.21 +
    1.22 +    NSMutableDictionary *identAlice2 = [[identAlice dictionary] mutableCopy];
    1.23      
    1.24      // This will revoke key
    1.25 -    [session keyMistrusted:identAlice];
    1.26 +    [session keyMistrusted:identAlice2];
    1.27      
    1.28      // Check fingerprint is different
    1.29 -    XCTAssertNotEqual(identAlice[kPepFingerprint], @"4ABE3AAF59AC32CFE4F86500A9411D176FF00E97");
    1.30 +    XCTAssertNotEqual(identAlice2[kPepFingerprint], @"4ABE3AAF59AC32CFE4F86500A9411D176FF00E97");
    1.31  
    1.32      [self pEpCleanUp];
    1.33  }