From bc315c8fbd5c4371133bfe418cade83e67f35255 Mon Sep 17 00:00:00 2001 From: Web Access Date: Wed, 4 May 2016 18:54:00 +0530 Subject: [PATCH] CRM-18151 --- tests/karma/unit/crmMailingRadioDateSpec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/karma/unit/crmMailingRadioDateSpec.js b/tests/karma/unit/crmMailingRadioDateSpec.js index f3628b5141..defda31a03 100644 --- a/tests/karma/unit/crmMailingRadioDateSpec.js +++ b/tests/karma/unit/crmMailingRadioDateSpec.js @@ -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); }); -- 2.25.1