Explorar o código

deformalize getEventSegs

Adam Shaw %!s(int64=11) %!d(string=hai) anos
pai
achega
9dcb153004
Modificáronse 2 ficheiros con 1 adicións e 5 borrados
  1. 1 0
      src/common/View.js
  2. 0 5
      tests/automated/custom-view-class.js

+ 1 - 0
src/common/View.js

@@ -438,6 +438,7 @@ var View = fc.View = Class.extend({
 	// Retrieves all the rendered segment objects for the view
 	// Retrieves all the rendered segment objects for the view
 	getEventSegs: function() {
 	getEventSegs: function() {
 		// subclasses must implement
 		// subclasses must implement
+		return [];
 	},
 	},
 
 
 
 

+ 0 - 5
tests/automated/custom-view-class.js

@@ -24,9 +24,6 @@ describe('custom view class', function() {
 				expect(moment.isMoment(events[0].start)).toBe(true);
 				expect(moment.isMoment(events[0].start)).toBe(true);
 				expect(moment.isMoment(events[0].end)).toBe(true);
 				expect(moment.isMoment(events[0].end)).toBe(true);
 			},
 			},
-			getEventSegs: function() {
-				return [];
-			},
 			destroyEvents: function() {
 			destroyEvents: function() {
 			},
 			},
 			renderSelection: function(range) {
 			renderSelection: function(range) {
@@ -42,7 +39,6 @@ describe('custom view class', function() {
 		spyOn(methods, 'render').and.callThrough();
 		spyOn(methods, 'render').and.callThrough();
 		spyOn(methods, 'setHeight').and.callThrough();
 		spyOn(methods, 'setHeight').and.callThrough();
 		spyOn(methods, 'renderEvents').and.callThrough();
 		spyOn(methods, 'renderEvents').and.callThrough();
-		spyOn(methods, 'getEventSegs').and.callThrough();
 		spyOn(methods, 'destroyEvents').and.callThrough();
 		spyOn(methods, 'destroyEvents').and.callThrough();
 		spyOn(methods, 'renderSelection').and.callThrough();
 		spyOn(methods, 'renderSelection').and.callThrough();
 		spyOn(methods, 'destroySelection').and.callThrough();
 		spyOn(methods, 'destroySelection').and.callThrough();
@@ -65,7 +61,6 @@ describe('custom view class', function() {
 		expect(methods.render).toHaveBeenCalled();
 		expect(methods.render).toHaveBeenCalled();
 		expect(methods.setHeight).toHaveBeenCalled();
 		expect(methods.setHeight).toHaveBeenCalled();
 		expect(methods.renderEvents).toHaveBeenCalled();
 		expect(methods.renderEvents).toHaveBeenCalled();
-		expect(methods.getEventSegs).toHaveBeenCalled();
 
 
 		$('#cal').fullCalendar('rerenderEvents');
 		$('#cal').fullCalendar('rerenderEvents');