Kaynağa Gözat

rename getEventSource -> getEventSourceById

Adam Shaw 9 yıl önce
ebeveyn
işleme
4ff088d6d9
2 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. 2 2
      src/EventManager.js
  2. 3 3
      tests/automated/getEventSourceById.js

+ 2 - 2
src/EventManager.js

@@ -19,7 +19,7 @@ function EventManager(options) { // assumed to be a calendar
 	t.fetchEvents = fetchEvents;
 	t.fetchEventSources = fetchEventSources;
 	t.getEventSources = getEventSources;
-	t.getEventSource = getEventSource;
+	t.getEventSourceById = getEventSourceById;
 	t.addEventSource = addEventSource;
 	t.removeEventSource = removeEventSource;
 	t.updateEvent = updateEvent;
@@ -287,7 +287,7 @@ function EventManager(options) { // assumed to be a calendar
 	}
 
 
-	function getEventSource(id) {
+	function getEventSourceById(id) {
 		return $.grep(sources, function(src) {
 			return src.id && src.id === id;
 		})[0];

+ 3 - 3
tests/automated/getEventSource.js → tests/automated/getEventSourceById.js

@@ -31,14 +31,14 @@ describe('getEventSource', function() {
 		};
 	});
 
-	it('retreives the queried event source', function(done) {
+	iit('retreives the queried event source', function(done) {
 		var eventSource1;
 		var eventSource2;
 
 		calendarEl.fullCalendar(options);
 
-		eventSource1 = calendarEl.fullCalendar('getEventSource', 'source1');
-		eventSource2 = calendarEl.fullCalendar('getEventSource', 'source2');
+		eventSource1 = calendarEl.fullCalendar('getEventSourceById', 'source1');
+		eventSource2 = calendarEl.fullCalendar('getEventSourceById', 'source2');
 
 		expect(eventSource1.id).toBe('source1');
 		expect(eventSource2.id).toBe('source2');