IOSAD-123 Back out: Create the identity before importing their key. IOSAD-123
authorDirk Zimmermann <dz@pep.security>
Tue, 23 Jul 2019 16:05:32 +0200
branchIOSAD-123
changeset 10937ffd168f20bd
parent 1092 22a8f18c6bdb
child 1094 4fb236082558
IOSAD-123 Back out: Create the identity before importing their key.
pEpObjCTests/PEPSessionTest.m
     1.1 --- a/pEpObjCTests/PEPSessionTest.m	Tue Jul 23 16:05:32 2019 +0200
     1.2 +++ b/pEpObjCTests/PEPSessionTest.m	Tue Jul 23 16:05:32 2019 +0200
     1.3 @@ -1443,23 +1443,18 @@
     1.4          session = [PEPSession new];
     1.5      }
     1.6  
     1.7 -    // Our test user:
     1.8 -    PEPIdentity *identTest = [[PEPIdentity alloc]
     1.9 -                              initWithAddress:address
    1.10 -                              userID:userID
    1.11 -                              userName:[NSString stringWithFormat:@"Some User Name %@", userID]
    1.12 -                              isOwn:NO];
    1.13 -
    1.14 -    NSError *error = nil;
    1.15 -
    1.16 -    XCTAssertTrue([session updateIdentity:identTest error:&error]);
    1.17 -    XCTAssertNil(error);
    1.18 -    XCTAssertNil(identTest.fingerPrint);
    1.19 -
    1.20      BOOL success = [PEPTestUtils importBundledKey:filePath session:session];
    1.21      XCTAssertTrue(success);
    1.22  
    1.23      if (success) {
    1.24 +        // Our test user:
    1.25 +        PEPIdentity *identTest = [[PEPIdentity alloc]
    1.26 +                                  initWithAddress:address
    1.27 +                                  userID:userID
    1.28 +                                  userName:[NSString stringWithFormat:@"Some User Name %@", userID]
    1.29 +                                  isOwn:NO];
    1.30 +
    1.31 +        NSError *error = nil;
    1.32          XCTAssertTrue([session updateIdentity:identTest error:&error]);
    1.33          XCTAssertNil(error);
    1.34          XCTAssertNotNil(identTest.fingerPrint);