CRM-18151
authorWeb Access <rohan.katkar@webaccessglobal.com>
Wed, 4 May 2016 13:24:00 +0000 (18:54 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Wed, 4 May 2016 13:24:00 +0000 (18:54 +0530)
tests/karma/unit/crmMailingRadioDateSpec.js

index f3628b5141b3f4d68ba8a56ddc39e8bad59f0e99..defda31a0324d9d5e54eed45e86b6fbb53841b45 100644 (file)
@@ -88,9 +88,10 @@ describe('crmMailingRadioDate', function() {
 
       var now = new Date();
       var month = '' + (now.getMonth() + 1);
+      var day = '' + (now.getDate() + 1);
       var year = (now.getFullYear() + 1);
+      if (day.length < 2) day = '0' + day;
       if (month.length < 2) month = '0' + month;
-      var day = "01";
       var minutes = "30";
       var hours = "09";
       var datenow = [year, month, day].join('-');
@@ -103,8 +104,7 @@ describe('crmMailingRadioDate', function() {
       expect($rootScope.myForm.$valid).toBe(true);
       expect(element.find('.radio-now').prop('checked')).toBe(false);
       expect(element.find('.radio-at').prop('checked')).toBe(true);
-      // expect(element.find('.crm-form-date').datepicker('getDate').toDateString()).toEqual(ndate.toDateString());
-      expect(element.find('.crm-form-date').datepicker('getDate').getUTCDate()).toEqual(ndate.getUTCDate());
+      expect(element.find('.crm-form-date').datepicker('getDate').toDateString()).toEqual(ndate.toDateString());
       expect(element.find('.crm-hidden-date').val()).toEqual(currentDate);
     });