-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] mail_composer_cc_bcc: duplicate email
- Loading branch information
Showing
6 changed files
with
25 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,7 @@ def test_MailComposer_upstream_file_hash(self): | |
self.assertIn(func_hash, VALID_HASHES.get("mail.composer:_compute_partner_ids")) | ||
|
||
def test_email_cc_bcc(self): | ||
self.test_record.email = "[email protected]" | ||
form = self.open_mail_composer_form() | ||
composer = form.save() | ||
# Use object to update Many2many fields (form can't do like this) | ||
|
@@ -75,8 +76,14 @@ def test_email_cc_bcc(self): | |
with self.mock_mail_gateway(): | ||
composer._action_send_mail() | ||
|
||
self.assertEqual(len(self._mails), 5) | ||
|
||
# Verify recipients of mail.message | ||
message = self.test_record.message_ids[0] | ||
|
||
# only keep 1 email to avoid clutting db | ||
# but actually send 1 mail per recipients | ||
self.assertEqual(len(message.mail_ids), 1) | ||
self.assertEqual(len(message.recipient_cc_ids), 3) | ||
self.assertEqual(len(message.recipient_bcc_ids), 1) | ||
# Verify notification | ||
|