@@ -3444,6 +3444,58 @@ def testSpacesAroundMultilinkPropertyValue(self):
34443444_______________________________________________________________________
34453445''' )
34463446
3447+ def testmsgHeaderPropertyAssignedto (self ):
3448+ ''' Test that setting the msg_header_property to an empty string
3449+ suppresses the X-Roundup-issue-prop header in generated email.
3450+ '''
3451+ reference_email = '''FROM: [email protected] 3452+ 3453+ Content-Type: text/plain; charset="utf-8"
3454+ Subject: [issue1] set assignedto
3455+ 3456+ From: "Bork, Chef" <[email protected] > 3457+ Reply-To: Roundup issue tracker
3458+ 3459+ MIME-Version: 1.0
3460+ Message-Id: <followup_dummy_id>
3461+ In-Reply-To: <dummy_test_message_id>
3462+ X-Roundup-Name: Roundup issue tracker
3463+ X-Roundup-Loop: hello
3464+ X-Roundup-Issue-Status: chatting
3465+ X-Roundup-Issue-Assignedto: mary
3466+ Content-Transfer-Encoding: quoted-printable
3467+
3468+ Bork, Chef <[email protected] > added the comment: 3469+
3470+ Check that assignedto makes it into an X-Header
3471+
3472+ ----------
3473+ assignedto: -> mary
3474+ nosy: +mary
3475+ status: unread -> chatting
3476+ title: Testing... -> set assignedto
3477+
3478+ _______________________________________________________________________
3479+ Roundup issue tracker <[email protected] > 3480+ <http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1>
3481+ _______________________________________________________________________
3482+ '''
3483+ self .db .issue .properties ['assignedto' ].msg_header_property = 'username'
3484+
3485+ nodeid1 = self .doNewIssue ()
3486+ nodeid2 = self ._handle_mail ('''Content-Type: text/plain;
3487+ charset="iso-8859-1"
3488+ From: "Bork, Chef" <[email protected] > 3489+ 3490+ Message-Id: <followup_dummy_id>
3491+ In-Reply-To: <dummy_test_message_id>
3492+ Subject: [issue1] set assignedto [assignedto=mary]
3493+
3494+ Check that assignedto makes it into an X-Header
3495+ ''' )
3496+ assert os .path .exists (SENDMAILDEBUG )
3497+ self .compareMessages (self ._get_mail (), reference_email )
3498+
34473499 def testmsgHeaderPropertyEmptyString (self ):
34483500 ''' Test that setting the msg_header_property to an empty string
34493501 suppresses the X-Roundup-issue-prop header in generated email.
0 commit comments