diff options
| author | Igor Minar | 2011-10-07 14:11:32 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-10-12 23:04:48 -0700 |
| commit | 8611ebe6a0d61092c1e66eb636e817c1445fd73f (patch) | |
| tree | 36d0e6acf79845f399b05fc5f475805c87ae0b7f /test/markupSpec.js | |
| parent | 8f46a3c9ac075c6300e974efaecd0d10d986a515 (diff) | |
| download | angular.js-8611ebe6a0d61092c1e66eb636e817c1445fd73f.tar.bz2 | |
fix(compiler): linking function should call $digest
The linked scope should be $digest-ed but only if a $digest isn't
already running on it.
Diffstat (limited to 'test/markupSpec.js')
| -rw-r--r-- | test/markupSpec.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/markupSpec.js b/test/markupSpec.js index d505ee73..a05ca44f 100644 --- a/test/markupSpec.js +++ b/test/markupSpec.js @@ -167,11 +167,20 @@ describe("markups", function() { }); it('should bind Text with no Bindings', function() { - forEach('src,href,checked,disabled,multiple,readonly,selected'.split(','), function(name) { + forEach(['checked', 'disabled', 'multiple', 'readonly', 'selected'], function(name) { compile('<div ng:' + name +'="some"></div>'); - expect(sortedHtml(element)).toEqual('<div ng:bind-attr="{"' + name +'":"some"}"></div>'); + expect(element.attr('ng:bind-attr')).toBe('{"' + name +'":"some"}'); + expect(element.attr(name)).toBe(name); dealoc(element); }); + + compile('<div ng:src="some"></div>'); + expect(sortedHtml(element)).toEqual('<div ng:bind-attr="{"src":"some"}" src="some"></div>'); + dealoc(element); + + compile('<div ng:href="some"></div>'); + expect(sortedHtml(element)).toEqual('<div href="some" ng:bind-attr="{"href":"some"}"></div>'); + dealoc(element); }); it('should Parse Text With No Bindings', function() { |
