aboutsummaryrefslogtreecommitdiffstats
path: root/test/directive/inputSpec.js
diff options
context:
space:
mode:
authorVojta Jina2012-03-09 16:58:48 -0800
committerVojta Jina2012-03-09 17:33:22 -0800
commit83314913e717f18cdb9a817e67c24651930ebe7e (patch)
treea35370bf5d9675c6050b1499fa02f877116420e7 /test/directive/inputSpec.js
parente0cc84ad7b7cdeb22cc56a75ab0775b90791da06 (diff)
downloadangular.js-83314913e717f18cdb9a817e67c24651930ebe7e.tar.bz2
refactor(forms): Rename read() -> setViewValue()
Diffstat (limited to 'test/directive/inputSpec.js')
-rw-r--r--test/directive/inputSpec.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/directive/inputSpec.js b/test/directive/inputSpec.js
index 5a0c4168..e7c40b0a 100644
--- a/test/directive/inputSpec.js
+++ b/test/directive/inputSpec.js
@@ -113,7 +113,7 @@ describe('NgModelController', function() {
describe('view -> model', function() {
it('should set the value to $viewValue', function() {
- ctrl.read('some-val');
+ ctrl.setViewValue('some-val');
expect(ctrl.viewValue).toBe('some-val');
});
@@ -131,7 +131,7 @@ describe('NgModelController', function() {
return value + '-b';
});
- ctrl.read('init');
+ ctrl.setViewValue('init');
expect(log).toEqual(['init', 'init-a']);
expect(ctrl.modelValue).toBe('init-a-b');
});
@@ -141,13 +141,13 @@ describe('NgModelController', function() {
var spy = jasmine.createSpy('$viewChange');
scope.$on('$viewChange', spy);
- ctrl.read('val');
+ ctrl.setViewValue('val');
expect(spy).toHaveBeenCalledOnce();
spy.reset();
// invalid
ctrl.parsers.push(function() {return undefined;});
- ctrl.read('val');
+ ctrl.setViewValue('val');
expect(spy).not.toHaveBeenCalled();
});
});