From: Seamus Lee Date: Sun, 15 Mar 2020 22:55:22 +0000 (+1100) Subject: [NFC] Add in unit test for creating a new system work flow message template with... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=98a6b50c326f11ec44f920cb673a54c2666ab664;p=civicrm-core.git [NFC] Add in unit test for creating a new system work flow message template with only edit system workflow message templates permission --- diff --git a/tests/phpunit/api/v3/MessageTemplateTest.php b/tests/phpunit/api/v3/MessageTemplateTest.php index 8d38dd0fb8..148b68d736 100644 --- a/tests/phpunit/api/v3/MessageTemplateTest.php +++ b/tests/phpunit/api/v3/MessageTemplateTest.php @@ -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',