Browse Source

IOSAD-178 No test needed for setFlags

IOSAD-178
Dirk Zimmermann 2 years ago
parent
commit
5f2b3c277d
1 changed files with 0 additions and 55 deletions
  1. +0
    -55
      pEpObjCTests/PEPAsyncSessionTest.m

+ 0
- 55
pEpObjCTests/PEPAsyncSessionTest.m View File

@ -335,36 +335,6 @@
XCTAssertTrue(boolNum.boolValue);
}
- (void)testSetIdentityFlags
{
PEPIdentity *me = [PEPTestUtils ownPepIdentityWithAddress:@"me@peptest.ch"
userName:@"userName"];
NSError *error = nil;
me = [self mySelf:me error:&error];
XCTAssertNotNil(me);
XCTAssertNil(error);
PEPIdentityFlags theFlags[] = {
PEPIdentityFlagsNotForSync,
PEPIdentityFlagsList,
PEPIdentityFlagsDeviceGroup,
0
};
for (int i = 0;; ++i) {
PEPIdentityFlags aFlag = theFlags[i];
if (aFlag == 0) {
break;
}
error = nil;
PEPIdentity *meNew = [self setFlags:(PEPIdentityFlags) aFlag forIdentity:me error:&error];
XCTAssertNotNil(meNew);
XCTAssertNil(error);
XCTAssertTrue(meNew.flags & theFlags[i]);
}
}
- (void)testTrustOwnKey
{
PEPIdentity *me = [PEPTestUtils ownPepIdentityWithAddress:@"me@peptest.ch"
@ -947,31 +917,6 @@
return result;
}
- (PEPIdentity *_Nullable)setFlags:(PEPIdentityFlags)flags
forIdentity:(PEPIdentity *)identity
error:(NSError * _Nullable * _Nullable)error
{
PEPAsyncSession *asyncSession = [PEPAsyncSession new];
XCTestExpectation *exp = [self expectationWithDescription:@"exp"];
__block PEPIdentity *result = nil;
__block NSError *theError = nil;
[asyncSession setFlags:flags
forIdentity:identity
errorCallback:^(NSError * _Nonnull error) {
result = nil;
theError = error;
[exp fulfill];
} successCallback:^(PEPIdentity *identity) {
result = identity;
[exp fulfill];
}];
[self waitForExpectations:@[exp] timeout:PEPTestInternalSyncTimeout];
if (error) {
*error = theError;
}
return result;
}
- (BOOL)trustOwnKeyIdentity:(PEPIdentity * _Nonnull)identity
error:(NSError * _Nullable * _Nullable)error
{


Loading…
Cancel
Save