Add test for reminder (not) repeating on same day
authoreileenmcnaugton <eileen@fuzion.co.nz>
Mon, 14 Mar 2016 11:42:23 +0000 (00:42 +1300)
committerdeb.monish <monish.deb@webaccessglobal.com>
Fri, 1 Apr 2016 06:00:33 +0000 (11:30 +0530)
tests/phpunit/CRM/Core/BAO/ActionScheduleTest.php

index 37ae8c07533f2ba4f1d9ad1c33612dd83ef0596f..22a6cc30c3c91892c17770ecef77748115ebcceb 100644 (file)
@@ -1290,6 +1290,13 @@ class CRM_Core_BAO_ActionScheduleTest extends CiviUnitTestCase {
         'recipients' => array(array('member@example.com')),
       ),
     ));
+    $this->assertCronRuns(array(
+      array(
+        // It should not re-send on the same day
+        'time' => '2012-04-12 01:00:00',
+        'recipients' => array(array()),
+      ),
+    ));
   }
 
   public function testMembershipOnMultipleReminder() {