From 55027132f3d57e5dcf94683e6e6bd7b0aae0087d Mon Sep 17 00:00:00 2001
From: Vojta Jina
Date: Fri, 23 Mar 2012 15:48:51 -0700
Subject: refactor(ngBindAttr): remove
Breaks ng-bind-attr directive removed
---
test/BinderSpec.js | 37 -------------------------------------
test/directive/ngBindSpec.js | 33 ---------------------------------
2 files changed, 70 deletions(-)
(limited to 'test')
diff --git a/test/BinderSpec.js b/test/BinderSpec.js
index 94b58d0a..306cbc43 100644
--- a/test/BinderSpec.js
+++ b/test/BinderSpec.js
@@ -49,20 +49,6 @@ describe('Binder', function() {
expect(element.text()).toBe('123');
}));
- it('AttributesNoneBound', inject(function($rootScope, $compile) {
- var a = $compile('')($rootScope);
- expect(a[0].nodeName).toBe('A');
- expect(a.attr('ng-bind-attr')).toBeFalsy();
- }));
-
- it('AttributesAreEvaluated', inject(function($rootScope, $compile) {
- var a = $compile('')($rootScope);
- $rootScope.$eval('a=1;b=2');
- $rootScope.$apply();
- expect(a.attr('a')).toBe('a');
- expect(a.attr('b')).toBe('a+b=3');
- }));
-
it('InputTypeButtonActionExecutesInScope', inject(function($rootScope, $compile) {
var savedCalled = false;
element = $compile(
@@ -414,29 +400,6 @@ describe('Binder', function() {
expect(optionC.text()).toEqual('C');
}));
- it('DeleteAttributeIfEvaluatesFalse', inject(function($rootScope, $compile) {
- element = $compile(
- '
' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '
')($rootScope);
- $rootScope.$apply();
- function assertChild(index, disabled) {
- expect(!!childNode(element, index).attr('disabled')).toBe(disabled);
- }
-
- assertChild(0, true);
- assertChild(1, false);
- assertChild(2, true);
- assertChild(3, false);
- assertChild(4, true);
- assertChild(5, false);
- }));
-
it('ItShouldSelectTheCorrectRadioBox', inject(function($rootScope, $compile) {
element = $compile(
'' +
diff --git a/test/directive/ngBindSpec.js b/test/directive/ngBindSpec.js
index ddfdd53d..01a07c52 100644
--- a/test/directive/ngBindSpec.js
+++ b/test/directive/ngBindSpec.js
@@ -77,37 +77,4 @@ describe('ng-bind-*', function() {
expect(fromJson(element.text())).toEqual({key:'value'});
}));
});
-
-
- describe('ng-bind-attr', function() {
- it('should bind attributes', inject(function($rootScope, $compile) {
- element = $compile('
')($rootScope);
- $rootScope.$digest();
- expect(element.attr('src')).toEqual('http://localhost/mysrc');
- expect(element.attr('alt')).toEqual('myalt');
- }));
-
- it('should not pretty print JSON in attributes', inject(function($rootScope, $compile) {
- element = $compile('
![{{ {a:1} }}]()
')($rootScope);
- $rootScope.$digest();
- expect(element.attr('alt')).toEqual('{"a":1}');
- }));
-
- it('should remove special attributes on false', inject(function($rootScope, $compile) {
- element = $compile('
')($rootScope);
- var input = element[0];
- expect(input.disabled).toEqual(false);
- expect(input.readOnly).toEqual(false);
- expect(input.checked).toEqual(false);
-
- $rootScope.disabled = true;
- $rootScope.readonly = true;
- $rootScope.checked = true;
- $rootScope.$digest();
-
- expect(input.disabled).toEqual(true);
- expect(input.readOnly).toEqual(true);
- expect(input.checked).toEqual(true);
- }));
- });
});
--
cgit v1.2.3