noconflict.js 651 B

1234567891011121314151617181920
  1. module('NoConflict', {
  2. setup: function(){
  3. var datepicker = $.fn.datepicker.noConflict();
  4. $.fn.bootstrapDP = datepicker;
  5. },
  6. teardown: function(){
  7. $.fn.datepicker = $.fn.bootstrapDP;
  8. delete $.fn.bootstrapDP;
  9. }
  10. });
  11. test('Datepicker starts after calling noConflict() (no undefined defaults or locale_opts)', function(){
  12. $('<div class="input-append date" id="datepicker">'+
  13. '<input size="16" type="text" value="12-02-2012" readonly>'+
  14. '<span class="add-on"><i class="icon-th"></i></span>'+
  15. '</div>')
  16. .appendTo('#qunit-fixture')
  17. .bootstrapDP();
  18. expect(0);
  19. });