diff --git a/test/select.spec.js b/test/select.spec.js index d502040b4..30da83c80 100644 --- a/test/select.spec.js +++ b/test/select.spec.js @@ -1725,6 +1725,26 @@ describe('ui-select tests', function() { expect(el.scope().$select.multiple).toBe(true); }); + + it('should preserve the model if tagging is enabled on select multiple', function() { + scope.selection.selectedMultiple = ["I am not on the list of choices"]; + + var el = compileTemplate( + ' \ + {{$item.name}} <{{$item.email}}> \ + \ +
\ +
\ +
\ +
\ + ' + ); + + scope.$digest(); + + expect(scope.selection.selectedMultiple) + .toEqual(["I am not on the list of choices"]); + }); it('should allow paste tag from clipboard', function() { scope.taggingFunc = function (name) {