Test handling of empty value selection

pull/1985/head
Hagen Schink 10 years ago
parent 776ba10bca
commit 39a7929cb2
  1. 25
      karma/tests/directives/components/toggled-multiselect-directive-test.js

@ -95,4 +95,29 @@ describe('toggledMultiselect Directive', function() {
});
});
});
describe('w/o values', function() {
beforeEach(function() {
scope.name = "BO' SELECTA";
scope.options = [
['New York', 'NY'],
['California', 'CA']
];
compile();
var multiselectToggleElement = element.find('a');
multiselectToggleElement.trigger('click');
});
describe('scope.values', function() {
it('should not become an array', function() {
expect(Array.isArray(scope.values)).to.be.false;
});
it('should leave scope.values as undefined', function() {
expect(scope.values).to.be.undefined;
});
});
});
});

Loading…
Cancel
Save