IOS-937 testIdentityRatingTrustResetMistrustUndo
authorDirk Zimmermann <dirk@pep-project.org>
Fri, 09 Feb 2018 16:08:10 +0100
changeset 44670bb6386c76f
parent 445 3027e25306ea
child 447 06f6fb54ee8e
IOS-937 testIdentityRatingTrustResetMistrustUndo
pEpObjCTests/PEPSessionTest.m
     1.1 --- a/pEpObjCTests/PEPSessionTest.m	Fri Feb 09 15:51:11 2018 +0100
     1.2 +++ b/pEpObjCTests/PEPSessionTest.m	Fri Feb 09 16:08:10 2018 +0100
     1.3 @@ -183,7 +183,7 @@
     1.4      XCTAssertEqual([session identityRating:alice], PEP_rating_reliable);
     1.5  }
     1.6  
     1.7 -- (void)testIdentityRatingMistrustUndo
     1.8 +- (void)testIdentityRatingTrustResetMistrustUndo
     1.9  {
    1.10      PEPSession *session = [PEPSession new];
    1.11  
    1.12 @@ -201,11 +201,23 @@
    1.13                            fingerPrint:@"4ABE3AAF59AC32CFE4F86500A9411D176FF00E97"];
    1.14      XCTAssertEqual([session identityRating:alice], PEP_rating_reliable);
    1.15  
    1.16 +    [session trustPersonalKey:alice];
    1.17 +    XCTAssertEqual([session identityRating:alice], PEP_rating_trusted);
    1.18 +
    1.19 +    [session keyResetTrust:alice];
    1.20 +    XCTAssertEqual([session identityRating:alice], PEP_rating_reliable);
    1.21 +
    1.22      [session keyMistrusted:alice];
    1.23      XCTAssertEqual([session identityRating:alice], PEP_rating_have_no_key);
    1.24  
    1.25      [session undoLastMistrust];
    1.26      XCTAssertEqual([session identityRating:alice], PEP_rating_reliable);
    1.27 +
    1.28 +    [session trustPersonalKey:alice];
    1.29 +    XCTAssertEqual([session identityRating:alice], PEP_rating_trusted);
    1.30 +
    1.31 +    [session keyResetTrust:alice];
    1.32 +    XCTAssertEqual([session identityRating:alice], PEP_rating_reliable);
    1.33  }
    1.34  
    1.35  - (void)testOutgoingColors