Просмотр исходного кода

fix problem where calendar dayNames setting wasnt being tested

Adam Shaw 11 лет назад
Родитель
Сommit
d55ff57b3e
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      tests/automated/dayNames.js

+ 2 - 2
tests/automated/dayNames.js

@@ -77,12 +77,12 @@ describe('day names', function() {
 
         dayClasses.forEach(function(cls, idx, classes) {
           it('should be ' + weekdays[idx], function() {
-            settings.dayNames = moment.weekdays();
+            settings.dayNames = [].slice.call(weekdays); // copy. in case there is a mutation
             settings.now = moment(referenceDate).add('days', idx);
 
             $('#cal').fullCalendar(settings);
 
-            expect($('.fc-view thead ' + cls)).toHaveText(moment.weekdays()[idx]);
+            expect($('.fc-view thead ' + cls)).toHaveText(weekdays[idx]);
           });
         });
       });