Patrick Rein uploaded a new version of NetworkTests to project The Trunk:
http://source.squeak.org/trunk/NetworkTests-pre.53.mcz==================== Summary ====================
Name: NetworkTests-pre.53
Author: pre
Time: 10 November 2017, 4:35:25.501812 pm
UUID: dcadda34-fe34-4f4e-8f8b-905ebe4a35dc
Ancestors: NetworkTests-topa.52
Adds a test for convenience methods to access attachments in mail messages
=============== Diff against NetworkTests-topa.52 ===============
Item was added:
+ ----- Method: MailMessageTest>>testAttachmentsReturnsTheAttachments (in category 'testing') -----
+ testAttachmentsReturnsTheAttachments
+
+ | fileName message |
+ message := MailMessage empty
+ addAttachmentFrom: 'abcxxx' readStream withName: 'aTestingAttachment';
+ body: ((MIMEDocument contentType: 'application/foo' content: 'This is the main text' squeakToUtf8)
+ charset: 'utf-8'; yourself).
+
+ self assert: message attachments size equals: 1.
+
+ fileName := (message attachments first fieldNamed: 'content-disposition' ifAbsent: [self fail])
+ parameterAt: 'filename' ifAbsent: [''].
+
+ self assert: fileName equals: 'aTestingAttachment'.
+ !