aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/directive/inputSpec.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/directive/inputSpec.js b/test/directive/inputSpec.js
index d9f6b7b3..54f3f7cd 100644
--- a/test/directive/inputSpec.js
+++ b/test/directive/inputSpec.js
@@ -4,9 +4,11 @@ describe('NgModelController', function() {
var ctrl, scope, ngModelAccessor;
beforeEach(inject(function($rootScope, $controller) {
+ var attrs = {name: 'testAlias'};
+
scope = $rootScope;
ngModelAccessor = jasmine.createSpy('ngModel accessor');
- ctrl = $controller(NgModelController, {$scope: scope, ngModel: ngModelAccessor});
+ ctrl = $controller(NgModelController, {$scope: scope, ngModel: ngModelAccessor, $attrs: attrs});
// mock accessor (locals)
ngModelAccessor.andCallFake(function(val) {
@@ -27,6 +29,8 @@ describe('NgModelController', function() {
expect(ctrl.formatters).toEqual([]);
expect(ctrl.parsers).toEqual([]);
+
+ expect(ctrl.widgetId).toBe('testAlias');
});