moved automated test files to new locations

This commit is contained in:
Adam Shaw
2014-01-26 13:59:42 -08:00
parent 0479d82d94
commit cdd3f29e98
21 changed files with 6 additions and 5 deletions
@@ -0,0 +1,60 @@
describe('when header options set with next|prev|prevYear|nextYear|today', function() {
beforeEach(function() {
affix('#calendar');
var options = {
header: {
left: 'next,prev,prevYear,nextYear today',
center: '',
right: 'title'
}
};
$('#calendar').fullCalendar(options);
});
describe('and click next', function() {
it('should change view to next month', function() {
$('#calendar').fullCalendar('gotoDate', 2010, 1, 1);
$('.fc-button-next').simulate('click');
var newDate = $('#calendar').fullCalendar('getDate');
expect(newDate).toEqual(new Date(2010, 2, 1));
});
});
describe('and click prev', function() {
it('should change view to prev month', function() {
$('#calendar').fullCalendar('gotoDate', 2010, 1, 1);
$('.fc-button-prev').simulate('click');
var newDate = $('#calendar').fullCalendar('getDate');
expect(newDate).toEqual(new Date(2009, 12, 1));
});
});
describe('and click prevYear', function() {
it('should change view to prev month', function() {
$('#calendar').fullCalendar('gotoDate', 2010, 1, 1);
$('.fc-button-prevYear').simulate('click');
var newDate = $('#calendar').fullCalendar('getDate');
expect(newDate).toEqual(new Date(2009, 1, 1));
});
});
describe('and click nextYear', function() {
it('should change view to prev month', function() {
$('#calendar').fullCalendar('gotoDate', 2010, 1, 1);
$('.fc-button-nextYear').simulate('click');
var newDate = $('#calendar').fullCalendar('getDate');
expect(newDate).toEqual(new Date(2011, 1, 1));
});
});
describe('and click today', function() {
it('should change view to prev month', function() {
$('#calendar').fullCalendar('gotoDate', 2010, 1, 1);
$('.fc-button-today').simulate('click');
var newDate = $('#calendar').fullCalendar('getDate');
expect(newDate.toDateString()).toEqual(new Date().toDateString());
});
});
});