columnHeaderText.js 644 B

12345678910111213141516171819202122232425262728
  1. describe('columnHeaderText', function() {
  2. pushOptions({
  3. defaultDate: '2014-05-11',
  4. columnHeaderText: function(date) {
  5. return '<div>Custom ' + date.format('dddd') + '</div>'
  6. }
  7. })
  8. describeOptions('defaultView', {
  9. 'when month view': 'month',
  10. 'when agenda view': 'agendaDay',
  11. 'when basic view': 'basicDay'
  12. }, function() {
  13. it('should contain custom HTML escaped text', function() {
  14. initCalendar()
  15. expect(hasCustomText()).toBe(true)
  16. })
  17. })
  18. function hasCustomText() {
  19. var firstHeader = $('.fc-day-header:first')
  20. return firstHeader.text() === '<div>Custom Sunday</div>'
  21. }
  22. })