IOSAD-95: Backed out changeset e0f83025943c
authorDirk Zimmermann <dirk@pep-project.org>
Mon, 18 Jun 2018 11:37:20 +0200
changeset 632463397b4646f
parent 631 6c9a4f311de7
child 633 e9078acc8b2a
IOSAD-95: Backed out changeset e0f83025943c
pEpObjCTests/PEPSessionTest.m
     1.1 --- a/pEpObjCTests/PEPSessionTest.m	Mon Jun 18 11:37:19 2018 +0200
     1.2 +++ b/pEpObjCTests/PEPSessionTest.m	Mon Jun 18 11:37:20 2018 +0200
     1.3 @@ -854,13 +854,7 @@
     1.4      XCTAssertEqual(rating, PEP_rating_trusted_and_anonymized);
     1.5  }
     1.6  
     1.7 -- (void)testEncryptedMailFromMuttWithTrustedServerOrNot
     1.8 -{
     1.9 -    [self testEncryptedMailFromMuttWithTrustedServer:NO];
    1.10 -    [self testEncryptedMailFromMuttWithTrustedServer:YES];
    1.11 -}
    1.12 -
    1.13 -- (void)testEncryptedMailFromMuttWithTrustedServer:(BOOL)trustedServer
    1.14 +- (void)testEncryptedMailFromMuttWithReencryption
    1.15  {
    1.16      PEPSession *session = [PEPSession new];
    1.17  
    1.18 @@ -901,11 +895,7 @@
    1.19      XCTAssertEqualObjects(msg, msgOriginal);
    1.20  
    1.21      PEP_rating rating = PEP_rating_undefined;
    1.22 -
    1.23      PEP_decrypt_flags flags = PEP_decrypt_flag_untrusted_server;
    1.24 -    if (trustedServer) {
    1.25 -        flags = 0;
    1.26 -    }
    1.27  
    1.28      PEPMessage *pepDecryptedMail = [session
    1.29                                      decryptMessage:msg
    1.30 @@ -920,9 +910,8 @@
    1.31      // Technically, the mail is encrypted, but the signatures don't match
    1.32      XCTAssertEqual(rating, PEP_rating_unreliable);
    1.33  
    1.34 -    if (trustedServer) {
    1.35 -        XCTAssertNotEqualObjects(msg, msgOriginal);
    1.36 -    }
    1.37 +    // Since we're requesting re-encryption, src should have been changed
    1.38 +    XCTAssertNotEqualObjects(msg, msgOriginal);
    1.39  
    1.40      XCTAssertNotNil(pepDecryptedMail.longMessage);
    1.41  }