From 748d9d7ffabb9c0fc182e1828db458b5c37afc27 Mon Sep 17 00:00:00 2001 From: Jon goldberg Date: Mon, 27 Apr 2015 16:13:49 -0600 Subject: [PATCH] CRM-13283 - ensure minimum_report_severity can't exceed 8 --- tests/phpunit/api/v3/StatusPreferenceTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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); + } + } -- 2.25.1