From 3bac004f1666c1eb4b3a5649cdf074d955071fa7 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Mon, 30 May 2016 19:41:06 +0200 Subject: [PATCH] fix(datepicker): occasionally failing test This fixes a test in the datepicker that would fail if the current date is the 30th or 31st, because the calendar month being tested is February. --- src/components/datepicker/calendar.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/datepicker/calendar.spec.js b/src/components/datepicker/calendar.spec.js index ed7fd6d418..6b9d967b32 100644 --- a/src/components/datepicker/calendar.spec.js +++ b/src/components/datepicker/calendar.spec.js @@ -341,12 +341,12 @@ describe('md-calendar', function() { applyDateChange(); var otherScope = $rootScope.$new(); + var day = 15; otherScope.myDate = controller.today; var otherNgElement = createElement(otherScope); var monthElement = element.querySelector('.md-calendar-month'); - var day = controller.today.getDate(); var dateElement = findDateElement(monthElement, day); var otherMonthElement = otherNgElement[0].querySelector('.md-calendar-month');