diff options
| author | Igor Minar | 2012-05-02 00:33:00 -0700 | 
|---|---|---|
| committer | Igor Minar | 2012-05-02 14:24:43 -0700 | 
| commit | 3bd3cc571dcd721f9d71f971aefee23115a5e458 (patch) | |
| tree | 015d9745865329ab5feca8780ef85f9f95aab498 /test/ng | |
| parent | c7f11015205835e83d935417e3342a18fe23c3fa (diff) | |
| download | angular.js-3bd3cc571dcd721f9d71f971aefee23115a5e458.tar.bz2 | |
fix(select): don't interfere with selection if not databound
Closes #926
Diffstat (limited to 'test/ng')
| -rw-r--r-- | test/ng/directive/selectSpec.js | 11 | 
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ng/directive/selectSpec.js b/test/ng/directive/selectSpec.js index d8fe150a..321990e8 100644 --- a/test/ng/directive/selectSpec.js +++ b/test/ng/directive/selectSpec.js @@ -61,6 +61,17 @@ describe('select', function() {      }); +    it('should not interfere with selection via selected attr if ngModel directive is not present', +        function() { +      compile('<select>' + +                '<option>not me</option>' + +                '<option selected>me!</option>' + +                '<option>nah</option>' + +              '</select>'); +      expect(element).toEqualSelect('not me', ['me!'], 'nah'); +    }); + +      it('should require', function() {        compile(          '<select name="select" ng-model="selection" required ng-change="change()">' +  | 
