eventClick.js 791 B

123456789101112131415161718192021222324252627282930313233343536
  1. describe('eventClick', function() {
  2. pushOptions({
  3. defaultDate: '2014-08-01'
  4. })
  5. it('works in month view', function(done) {
  6. var options = {}
  7. options.events = [
  8. { start: '2014-08-01', title: 'event1', className: 'event1' }
  9. ]
  10. options.eventAfterAllRender = function() {
  11. $('.event1').simulate('click')
  12. }
  13. options.eventClick = function() {
  14. done()
  15. }
  16. initCalendar(options)
  17. })
  18. it('works in month view via touch', function(done) {
  19. var options = {}
  20. options.events = [
  21. { start: '2014-08-01', title: 'event1', className: 'event1' }
  22. ]
  23. options.eventAfterAllRender = function() {
  24. $.simulateTouchClick($('.event1'))
  25. }
  26. options.eventClick = function() {
  27. done()
  28. }
  29. initCalendar(options)
  30. })
  31. })