From 3b898664eea9913b6b25261d7310a61de476d173 Mon Sep 17 00:00:00 2001 From: Mikk Kirstein Date: Tue, 14 May 2013 20:14:06 +0300 Subject: fix(ngValue): made ngValue to write value attribute to element --- test/ng/directive/inputSpec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ng/directive/inputSpec.js') diff --git a/test/ng/directive/inputSpec.js b/test/ng/directive/inputSpec.js index ff504872..d800bf92 100644 --- a/test/ng/directive/inputSpec.js +++ b/test/ng/directive/inputSpec.js @@ -1104,6 +1104,18 @@ describe('input', function() { describe('ngValue', function() { + it('should update the dom "value" property and attribute', function() { + compileInput(''); + + scope.$apply(function() { + scope.value = 'something'; + }); + + expect(inputElm[0].value).toBe('something'); + expect(inputElm[0].getAttribute('value')).toBe('something'); + }); + + it('should evaluate and set constant expressions', function() { compileInput('' + '' + -- cgit v1.2.3