mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-07-29 11:20:30 +08:00
automated tests for axisFormat
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
describe('axisFormat', function() {
|
||||
|
||||
var options;
|
||||
|
||||
function getAxisText() {
|
||||
return $('.fc-agenda-slots tr th.fc-agenda-axis:first').text();
|
||||
}
|
||||
|
||||
beforeEach(function() {
|
||||
affix('#cal');
|
||||
options = {
|
||||
defaultDate: '2014-06-04',
|
||||
defaultView: 'agendaWeek'
|
||||
};
|
||||
});
|
||||
|
||||
it('renders correctly when default', function() {
|
||||
$('#cal').fullCalendar(options);
|
||||
expect(getAxisText()).toBe('12am');
|
||||
});
|
||||
|
||||
it('renders correctly when default and the language is customized', function() {
|
||||
options.lang = 'en-gb';
|
||||
$('#cal').fullCalendar(options);
|
||||
expect(getAxisText()).toBe('00');
|
||||
});
|
||||
|
||||
it('renders correctly when customized', function() {
|
||||
options.axisFormat = 'H:mm:mm[!]';
|
||||
$('#cal').fullCalendar(options);
|
||||
expect(getAxisText()).toBe('0:00:00!');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user