pEpObjCTests/TestUtils/PEPTestUtils.m
changeset 581 0954976b8da9
parent 579 1ddf35bfa4f3
child 754 78dbef38ae98
     1.1 --- a/pEpObjCTests/TestUtils/PEPTestUtils.m	Mon Apr 16 11:01:22 2018 +0200
     1.2 +++ b/pEpObjCTests/TestUtils/PEPTestUtils.m	Mon Apr 16 11:01:23 2018 +0200
     1.3 @@ -76,8 +76,8 @@
     1.4  {
     1.5      NSMutableArray *attachments = [NSMutableArray new];
     1.6      for (NSDictionary *attachmentDict in [message objectForKey:kPepAttachments]) {
     1.7 -        PEPAttachment *attachment = [PEPAttachment new];
     1.8 -        attachment.data = [attachmentDict objectForKey:@"data"];
     1.9 +        PEPAttachment *attachment = [[PEPAttachment alloc]
    1.10 +                                     initWithData:[attachmentDict objectForKey:@"data"]];
    1.11          attachment.filename = [attachmentDict objectForKey:@"filename"];
    1.12          attachment.mimeType = [attachmentDict objectForKey:@"mimeType"];
    1.13          [attachments addObject:attachment];