From: Jon goldberg Date: Mon, 27 Apr 2015 22:13:49 +0000 (-0600) Subject: CRM-13283 - ensure minimum_report_severity can't exceed 8 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=748d9d7ffabb9c0fc182e1828db458b5c37afc27;p=civicrm-core.git CRM-13283 - ensure minimum_report_severity can't exceed 8 --- diff --git a/tests/phpunit/api/v3/StatusPreferenceTest.php b/tests/phpunit/api/v3/StatusPreferenceTest.php index 2059232520..3091e967fb 100644 --- a/tests/phpunit/api/v3/StatusPreferenceTest.php +++ b/tests/phpunit/api/v3/StatusPreferenceTest.php @@ -100,4 +100,12 @@ class api_v3_StatusPreferenceTest extends CiviUnitTestCase { $this->assertEquals($statusPreference['values'][$id]['minimum_report_severity'], $result['values'][$id]['minimum_report_severity'], 'In line ' . __LINE__); } + /** + * Ensure you can't create a StatusPref with minimum_report_severity > 8. + */ + public function testCreateInvalidMinimumReportSeverity() { + $this->_params['minimum_report_severity'] = 45; + $result = $this->callAPIFailure('StatusPreference', 'create', $this->_params); + } + }