@@ -89,7 +89,7 @@ describe('uiCalendar', function () {
89
89
} ) ;
90
90
91
91
/* test the calendar's initial setup */
92
- it ( 'expects the calendar to be set up with the correct options and events' , function ( ) {
92
+ it ( 'should set up the calendar with the correct options and events' , function ( ) {
93
93
expect ( $ . fn . fullCalendar . mostRecentCall . args [ 0 ] . eventSources [ 0 ] . length ) . toBe ( 4 ) ;
94
94
expect ( $ . fn . fullCalendar . mostRecentCall . args [ 0 ] . eventSources [ 0 ] [ 0 ] . title ) . toBe ( 'All Day Event' ) ;
95
95
expect ( $ . fn . fullCalendar . mostRecentCall . args [ 0 ] . eventSources [ 0 ] [ 0 ] . url ) . toBe ( 'http://www.angularjs.org' ) ;
@@ -99,7 +99,7 @@ describe('uiCalendar', function () {
99
99
expect ( $ . fn . fullCalendar . mostRecentCall . args [ 0 ] . weekends ) . toEqual ( false ) ;
100
100
} ) ;
101
101
/* Test to make sure that when an event is added to the calendar everything is updated with the new event. */
102
- it ( 'expects that when events are added to the calendar the fullcalendar will call its renderEvent method' , function ( ) {
102
+ it ( 'should call its renderEvent method' , function ( ) {
103
103
expect ( $ . fn . fullCalendar . mostRecentCall . args [ 0 ] . eventSources [ 0 ] . length ) . toEqual ( 4 ) ;
104
104
expect ( $ . fn . fullCalendar . callCount ) . toEqual ( 1 ) ;
105
105
scope . addChild ( scope . events ) ;
@@ -112,7 +112,7 @@ describe('uiCalendar', function () {
112
112
expect ( $ . fn . fullCalendar . mostRecentCall . args [ 0 ] ) . toEqual ( 'renderEvent' ) ;
113
113
} ) ;
114
114
/* Test to see if calendar is calling removeEvents when an event is removed */
115
- it ( 'removes the correct event from the event source.' , function ( ) {
115
+ it ( 'should remove the correct event from the event source.' , function ( ) {
116
116
//remove an event from the scope.
117
117
scope . remove ( scope . events2 , 0 ) ;
118
118
scope . $apply ( ) ;
@@ -129,15 +129,15 @@ describe('uiCalendar', function () {
129
129
expect ( callCount ) . toEqual ( 3 ) ;
130
130
} ) ;
131
131
/* Test to see if calendar is updating when a new eventSource is added. */
132
- it ( 'updates the calendar if an eventSource is Added' , function ( ) {
132
+ it ( 'should update the calendar if an eventSource is Added' , function ( ) {
133
133
scope . addSource ( scope . events4 ) ;
134
134
scope . $apply ( ) ;
135
135
//eventSources should auto update inside the calendar.
136
136
var fullCalendarParam = $ . fn . fullCalendar . mostRecentCall . args [ 0 ] ;
137
137
expect ( fullCalendarParam ) . toEqual ( 'addEventSource' ) ;
138
138
} ) ;
139
139
/* Test to see if calendar is updating when an eventSource replaces another with an equal length. */
140
- it ( 'updates the calendar if an eventSource has same length as prior eventSource' , function ( ) {
140
+ it ( 'should update the calendar if an eventSource has same length as prior eventSource' , function ( ) {
141
141
//replace source with one that has the same length
142
142
scope . eventSources . splice ( 1 , 1 , scope . events3 ) ;
143
143
scope . $apply ( ) ;
@@ -156,14 +156,14 @@ describe('uiCalendar', function () {
156
156
expect ( callCount ) . toEqual ( 4 ) ;
157
157
} ) ;
158
158
159
- it ( 'make sure the calendar can work with extended event sources' , function ( ) {
159
+ it ( 'should work with extended event sources' , function ( ) {
160
160
scope . eventSources . push ( scope . calEventsExt ) ;
161
161
scope . $apply ( ) ;
162
162
var fullCalendarParam = $ . fn . fullCalendar . mostRecentCall . args [ 0 ] ;
163
163
expect ( fullCalendarParam ) . toEqual ( 'addEventSource' ) ;
164
164
} ) ;
165
165
166
- it ( 'make sure that if we just change the title of the event that it updates itself' , function ( ) {
166
+ it ( 'should make sure that if we just change the title of the event that it updates itself' , function ( ) {
167
167
scope . events [ 0 ] . title = 'change title' ;
168
168
scope . $apply ( ) ;
169
169
var fullCalendarParam = $ . fn . fullCalendar . mostRecentCall . args [ 0 ] ;
@@ -172,7 +172,7 @@ describe('uiCalendar', function () {
172
172
expect ( fullCalendarParam1 ) . toEqual ( scope . events [ 0 ] ) ;
173
173
} ) ;
174
174
175
- it ( 'make sure that if the calendars options change then the fullcalendar method is called with the new options' , function ( ) {
175
+ it ( 'should make sure that if the calendars options change then the fullcalendar method is called with the new options' , function ( ) {
176
176
expect ( $ . fn . fullCalendar . mostRecentCall . args [ 0 ] . weekends ) . toEqual ( false ) ;
177
177
scope . uiConfig . calendar . weekends = true ;
178
178
scope . $apply ( ) ;
@@ -206,11 +206,11 @@ describe('uiCalendar', function () {
206
206
scope . $apply ( ) ;
207
207
} ) ;
208
208
209
- it ( 'make sure changeWatcher is initialized' , function ( ) {
209
+ it ( 'should make sure changeWatcher is initialized' , function ( ) {
210
210
expect ( calendarCtrl . changeWatcher ) . not . toBe ( undefined ) ;
211
211
} ) ;
212
212
213
- it ( 'makes sure the correct function is called when an event source is added or removed' , function ( ) {
213
+ it ( 'should make sure the correct function is called when an event source is added or removed' , function ( ) {
214
214
var sourceWatcher = calendarCtrl . changeWatcher ( scope . eventSources , calendarCtrl . sourcesFingerprint ) ;
215
215
expect ( sourcesChanged ) . toBe ( false ) ;
216
216
sourceWatcher . subscribe ( scope ) ;
@@ -225,7 +225,7 @@ describe('uiCalendar', function () {
225
225
expect ( sourcesChanged ) . toBe ( 'removed' ) ;
226
226
} ) ;
227
227
228
- it ( 'makes sure the correct function is called when a single event is added or removed' , function ( ) {
228
+ it ( 'should make sure the correct function is called when a single event is added or removed' , function ( ) {
229
229
var eventsWatcher = calendarCtrl . changeWatcher ( calendarCtrl . allEvents , calendarCtrl . eventsFingerprint ) ;
230
230
expect ( sourcesChanged ) . toBe ( false ) ;
231
231
eventsWatcher . subscribe ( scope ) ;
@@ -244,7 +244,7 @@ describe('uiCalendar', function () {
244
244
expect ( sourcesChanged ) . toBe ( 'changed' ) ;
245
245
} ) ;
246
246
247
- it ( 'makes sure the correct function is called when the calendarWatchEvent function is return variable is altered' , function ( ) {
247
+ it ( 'should make sure the correct function is called when the calendarWatchEvent function is return variable is altered' , function ( ) {
248
248
scope . testX = 0 ;
249
249
250
250
scope . calendarWatchEvent = function ( ) {
@@ -266,7 +266,7 @@ describe('uiCalendar', function () {
266
266
expect ( sourcesChanged ) . toBe ( 'changed' ) ;
267
267
} ) ;
268
268
269
- it ( 'makes sure that eventSources in extended form are tracked properly' , function ( ) {
269
+ it ( 'should make sure that eventSources in extended form are tracked properly' , function ( ) {
270
270
scope . testX = 0 ;
271
271
scope . eventSources . push ( scope . calEventsExt ) ;
272
272
var calendarCtrl2 = $controller ( 'uiCalendarCtrl' , { $scope : scope , $element : null } ) ;
@@ -301,22 +301,22 @@ describe('uiCalendar', function () {
301
301
scope . $apply ( ) ;
302
302
} ) ;
303
303
304
- it ( 'make sure the calendar sets the myCalendar object to the defining scope' , function ( ) {
304
+ it ( 'should make sure the calendar sets the myCalendar object to the defining scope' , function ( ) {
305
305
expect ( scope . myCalendar ) . not . toBe ( undefined ) ;
306
306
} ) ;
307
307
} ) ;
308
308
309
309
describe ( 'Local variable config testing and option overriding' , function ( ) {
310
310
311
- it ( 'sets names for $locale by default' , function ( ) {
311
+ it ( 'should set names for $locale by default' , function ( ) {
312
312
spyOn ( $ . fn , 'fullCalendar' ) ;
313
313
$locale . DATETIME_FORMATS . MONTH [ 0 ] = 'enero' ;
314
314
$compile ( '<div ui-calendar="uiConfig.calendar" ng-model="eventSources"></div>' ) ( scope ) ;
315
315
scope . $apply ( ) ;
316
316
expect ( $ . fn . fullCalendar . mostRecentCall . args [ 0 ] . monthNames [ 0 ] ) . toBe ( 'enero' ) ;
317
317
} ) ;
318
318
319
- it ( 'allows overriding names for $locale' , function ( ) {
319
+ it ( 'should allow overriding names for $locale' , function ( ) {
320
320
spyOn ( $ . fn , 'fullCalendar' ) ;
321
321
scope . uiConfig . calendar . monthNames = $locale . DATETIME_FORMATS . MONTH . slice ( ) ;
322
322
scope . uiConfig . calendar . monthNames [ 0 ] = 'custom name' ;
@@ -326,7 +326,7 @@ describe('uiCalendar', function () {
326
326
} ) ;
327
327
328
328
/* Test to make sure header options can be overwritten */
329
- it ( 'overwrites default header options' , function ( ) {
329
+ it ( 'should overwrite default header options' , function ( ) {
330
330
spyOn ( $ . fn , 'fullCalendar' ) ;
331
331
scope . uiConfig2 = {
332
332
calendar :{
@@ -350,7 +350,7 @@ describe('uiCalendar', function () {
350
350
scope . $apply ( ) ;
351
351
} ) ;
352
352
353
- it ( 'makes sure that all config functions are called in an angular context' , inject ( function ( $timeout , $rootScope ) {
353
+ it ( 'should make sure that all config functions are called in an angular context' , inject ( function ( $timeout , $rootScope ) {
354
354
var functionCount = 0 ;
355
355
scope . uiConfig = {
356
356
calendar :{
@@ -385,7 +385,7 @@ describe('uiCalendar', function () {
385
385
} ) ;
386
386
} ) ) ;
387
387
388
- it ( 'makes sure that any function that already has an apply in it does not break the calendar (backwards compatible)' , inject ( function ( $timeout , $rootScope ) {
388
+ it ( 'should make sure that any function that already has an apply in it does not break the calendar (backwards compatible)' , inject ( function ( $timeout , $rootScope ) {
389
389
390
390
var functionCount = 0 ;
391
391
scope . uiConfig = {
0 commit comments