[NFC] Add in unit test for creating a new system work flow message template with...
authorSeamus Lee <seamuslee001@gmail.com>
Sun, 15 Mar 2020 22:55:22 +0000 (09:55 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Mon, 16 Mar 2020 00:10:01 +0000 (11:10 +1100)
tests/phpunit/api/v3/MessageTemplateTest.php

index 8d38dd0fb8c0717470a074478f98492213bb64d3..148b68d7361018ee544df243e6f121f26f26c27f 100644 (file)
@@ -103,6 +103,10 @@ class api_v3_MessageTemplateTest extends CiviUnitTestCase {
       'msg_subject' => 'test msg permission subject',
       'check_permissions' => TRUE,
     ]);
+    $newEntityParams = $entity['values'][$entity['id']];
+    unset($newEntityParams['id']);
+    $newEntityParams['check_permissions'] = TRUE;
+    $this->callAPISuccess('MessageTemplate', 'create', $newEntityParams);
     // verify with all 3 permissions someone can do everything.
     CRM_Core_Config::singleton()->userPermissionClass->permissions = [
       'edit system workflow message templates',