describe('input', function() { // Override the options $.extend($.fn.bootstrapValidator.DEFAULT_OPTIONS, { feedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' } }); beforeEach(function(done) { $([ '
' ].join('\n')).appendTo('body'); $('#inputForm').bootstrapValidator(); this.bv = $('#inputForm').data('bootstrapValidator'); this.$text = this.bv.getFieldElements('text'); this.$input1 = this.bv.getFieldElements('input1'); this.$input2 = this.bv.getFieldElements('input2'); setTimeout(done, 0); }); afterEach(function() { $('#inputForm').bootstrapValidator('destroy').remove(); }); // #1040 it('fields should not be validated on init', function() { expect(this.bv.getMessages(this.$text)).toEqual([]); expect(this.bv.getMessages(this.$input1)).toEqual([]); expect(this.bv.getMessages(this.$input2)).toEqual([]); }); });