Explorar el Código

test that listview uses eventRender

Adam Shaw hace 9 años
padre
commit
cb78833982
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. 10 0
      tests/automated/ListView.js

+ 10 - 0
tests/automated/ListView.js

@@ -39,6 +39,16 @@ describe('ListView rendering', function() {
 			expect(events[1].title).toBe('event 2');
 			expect(events[1].timeText).toBe('all-day');
 		});
+
+		it('filters events through eventRender', function() {
+			options.eventRender = function(event, el) {
+				el.find('.fc-event-dot').replaceWith('<span class="custom-icon" />');
+			};
+
+			$('#cal').fullCalendar(options);
+
+			expect($('.custom-icon').length).toBe(2);
+		});
 	});
 
 	describe('with timed events', function() {