From e2b2d8af16418d75a682f0a8d4d7faa7998f3e3a Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 3 Oct 2021 16:11:33 -0700 Subject: [PATCH] MailingPreview - We don't need the `[CiviMail Draft]` prefix for in-browser previews --- ext/flexmailer/src/API/MailingPreview.php | 1 - .../tests/phpunit/Civi/FlexMailer/MailingPreviewTest.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/flexmailer/src/API/MailingPreview.php b/ext/flexmailer/src/API/MailingPreview.php index 576fa1545e..e585eda77a 100644 --- a/ext/flexmailer/src/API/MailingPreview.php +++ b/ext/flexmailer/src/API/MailingPreview.php @@ -57,7 +57,6 @@ class MailingPreview { }; $job->mailing_id = $mailing->id ?: NULL; - $job->is_test = 1; $job->status = 'Complete'; $flexMailer = new FlexMailer(array( diff --git a/ext/flexmailer/tests/phpunit/Civi/FlexMailer/MailingPreviewTest.php b/ext/flexmailer/tests/phpunit/Civi/FlexMailer/MailingPreviewTest.php index aad8443ce4..a12ddad7c5 100644 --- a/ext/flexmailer/tests/phpunit/Civi/FlexMailer/MailingPreviewTest.php +++ b/ext/flexmailer/tests/phpunit/Civi/FlexMailer/MailingPreviewTest.php @@ -83,7 +83,7 @@ class MailingPreviewTest extends \CiviUnitTestCase { $this->assertMaxIds($maxIDs); $previewResult = $result['values'][$result['id']]['api.Mailing.preview']; - $this->assertEquals("[CiviMail Draft] Hello $displayName", + $this->assertEquals("Hello $displayName", $previewResult['values']['subject']); $this->assertStringContainsString("This is $displayName", $previewResult['values']['body_text']); @@ -112,7 +112,7 @@ class MailingPreviewTest extends \CiviUnitTestCase { $previewResult = $this->callAPISuccess('mailing', 'preview', $params); $this->assertMaxIds($maxIDs); - $this->assertEquals("[CiviMail Draft] Hello $displayName", + $this->assertEquals("Hello $displayName", $previewResult['values']['subject']); $this->assertStringContainsString("This is $displayName", $previewResult['values']['body_text']); -- 2.25.1