vector-im/element-ios/issues/4577 - Fixed tests.
MODIFY
MatrixKitTests/EncryptedAttachmentsTest.m
MatrixKitTests/EncryptedAttachmentsTest.m
NSInputStream *inputStream = [NSInputStream inputStreamWithData:ctData];
NSOutputStream *outputStream = [NSOutputStream outputStreamToMemory];
- NSError *err = [MXEncryptedAttachments decryptAttachment:inputInfo inputStream:inputStream outputStream:outputStream];
- XCTAssertNil(err);
+ [MXEncryptedAttachments decryptAttachment:inputInfo inputStream:inputStream outputStream:outputStream success:^{
NSData *gotData = [outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey];
NSData *wantData = [[NSData alloc] initWithBase64EncodedString:[MXBase64Tools padBase64:want] options:0];
XCTAssertEqualObjects(wantData, gotData, "Decrypted data did not match expectation.");
+ } failure:^(NSError *error) {
+ XCTFail();
+ }];
}
}

vector-im/element-ios/issues/4577 - Fixed tests.