CRM-13283 - ensure minimum_report_severity can't exceed 8
authorJon goldberg <jon@palantetech.coop>
Mon, 27 Apr 2015 22:13:49 +0000 (16:13 -0600)
committerJon goldberg <jon@palantetech.coop>
Tue, 21 Jul 2015 20:37:37 +0000 (16:37 -0400)
tests/phpunit/api/v3/StatusPreferenceTest.php

index 205923252077f638c6d5f2405110768c85050ccd..3091e967fb6347ee917d0bfedc7baebad801c138 100644 (file)
@@ -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);
+  }
+
 }