aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDi Peng2011-08-05 15:01:58 -0700
committerIgor Minar2011-08-18 23:44:15 -0700
commit714759100c2a48fe472845ff34050eaac1ce7727 (patch)
tree5b9a2796c17b6e4eb813ec89992980201ade795e /test
parentee8e981c47a843786500ef2c420bbcd2c878b167 (diff)
downloadangular.js-714759100c2a48fe472845ff34050eaac1ce7727.tar.bz2
refactor(widgets): remove input[button, submit, reset, image] and button windgets
These widgets are useless and only trigger extra $updateViews. The only reason we had them was to support ng:change on these widgets, but since there are no bindings present in these cases it doesn't make sense to support ng:change here. It's likely just a leftover from getangular.com Breaking change: ng:change for input[button], input[submit], input[reset], input[image] and button widgets is not supported any more
Diffstat (limited to 'test')
-rw-r--r--test/widgetsSpec.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js
index 225f0a1f..2f0ab6a3 100644
--- a/test/widgetsSpec.js
+++ b/test/widgetsSpec.js
@@ -293,18 +293,6 @@ describe("widget", function(){
expect(scope.$get('name')).toEqual('Kai');
});
- it('should call ng:change on button click', function(){
- compile('<input type="button" value="Click Me" ng:change="clicked = true"/>');
- browserTrigger(element);
- expect(scope.$get('clicked')).toEqual(true);
- });
-
- it('should support button alias', function(){
- compile('<button ng:change="clicked = true">Click {{"Me"}}.</button>');
- browserTrigger(element);
- expect(scope.$get('clicked')).toEqual(true);
- expect(scope.$element.text()).toEqual("Click Me.");
- });
describe('radio', function(){
@@ -417,14 +405,6 @@ describe("widget", function(){
expect(scope.$service('$log').error.logs.shift()[0]).
toMatchError(/Syntax Error: Token '''' is an unexpected token/);
});
-
- it('should report error on ng:change exception', function(){
- compile('<button ng:change="a-2=x">click</button>');
- browserTrigger(element);
- expect(element.hasClass('ng-exception')).toBeTruthy();
- expect(scope.$service('$log').error.logs.shift()[0]).
- toMatchError(/Syntax Error: Token '=' implies assignment but \[a-2\] can not be assigned to/);
- });
});
describe('ng:switch', function(){