From 87cfc27be331685043ea2a4414eba4fd8fbb4a2c Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Tue, 13 Jul 2010 11:20:11 -0700
Subject: changed remaining ng- to ng:
---
test/widgetsSpec.js | 42 +++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)
(limited to 'test/widgetsSpec.js')
diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js
index 158b24a8..1c9e698a 100644
--- a/test/widgetsSpec.js
+++ b/test/widgetsSpec.js
@@ -41,10 +41,10 @@ describe("widget", function(){
expect(scope.$get('count')).toEqual(2);
});
- describe("ng-format", function(){
+ describe("ng:format", function(){
it("should format text", function(){
- compile('');
+ compile('');
expect(scope.$get('list')).toEqual(['a', 'b', 'c']);
scope.$set('list', ['x', 'y', 'z']);
@@ -57,7 +57,7 @@ describe("widget", function(){
});
it("should come up blank if null", function(){
- compile('', function(){
+ compile('', function(){
scope.age = null;
});
expect(scope.age).toBeNull();
@@ -65,7 +65,7 @@ describe("widget", function(){
});
it("should show incorect text while number does not parse", function(){
- compile('');
+ compile('');
scope.age = 123;
scope.$eval();
scope.$element.val('123X');
@@ -76,14 +76,14 @@ describe("widget", function(){
});
it("should clober incorect text if model changes", function(){
- compile('');
+ compile('');
scope.age = 456;
scope.$eval();
expect(scope.$element.val()).toEqual('456');
});
it("should not clober text if model changes doe to itself", function(){
- compile('');
+ compile('');
scope.$element.val('a ');
scope.$element.trigger('change');
@@ -107,7 +107,7 @@ describe("widget", function(){
});
it("should come up blank when no value specifiend", function(){
- compile('');
+ compile('');
scope.$eval();
expect(scope.$element.val()).toEqual('');
expect(scope.age).toEqual(null);
@@ -134,7 +134,7 @@ describe("widget", function(){
expect(scope.checkbox).toEqual(true);
});
- it("should use ng-format", function(){
+ it("should use ng:format", function(){
angularFormatter('testFormat', {
parse: function(value){
return value ? "Worked" : "Failed";
@@ -146,7 +146,7 @@ describe("widget", function(){
}
});
- compile('');
+ compile('');
expect(scope.state).toEqual("Worked");
expect(scope.$element[0].checked).toEqual(true);
@@ -161,9 +161,9 @@ describe("widget", function(){
});
});
- describe("ng-validate", function(){
- it("should process ng-validate", function(){
- compile('');
+ describe("ng:validate", function(){
+ it("should process ng:validate", function(){
+ compile('');
expect(element.hasClass('ng-validation-error')).toBeTruthy();
expect(element.attr('ng-validation-error')).toEqual('Not a number');
@@ -179,7 +179,7 @@ describe("widget", function(){
});
it('should not blow up for validation with bound attributes', function() {
- compile('');
+ compile('');
expect(element.hasClass('ng-validation-error')).toBeTruthy();
expect(element.attr('ng-validation-error')).toEqual('Required');
@@ -192,7 +192,7 @@ describe("widget", function(){
it("should not call validator if undefined/empty", function(){
var lastValue = "NOT_CALLED";
angularValidator.myValidator = function(value){lastValue = value;};
- compile('');
+ compile('');
expect(lastValue).toEqual("NOT_CALLED");
scope.url = 'http://server';
@@ -205,19 +205,19 @@ describe("widget", function(){
});
it("should ignore disabled widgets", function(){
- compile('');
+ compile('');
expect(element.hasClass('ng-validation-error')).toBeFalsy();
expect(element.attr('ng-validation-error')).toBeFalsy();
});
it("should ignore readonly widgets", function(){
- compile('');
+ compile('');
expect(element.hasClass('ng-validation-error')).toBeFalsy();
expect(element.attr('ng-validation-error')).toBeFalsy();
});
- it("should process ng-required", function(){
- compile('');
+ it("should process ng:required", function(){
+ compile('');
expect(element.hasClass('ng-validation-error')).toBeTruthy();
expect(element.attr('ng-validation-error')).toEqual('Required');
@@ -232,8 +232,8 @@ describe("widget", function(){
expect(element.attr('ng-validation-error')).toEqual('Required');
});
- it('should allow conditions on ng-required', function() {
- compile('');
+ it('should allow conditions on ng:required', function() {
+ compile('');
scope.$set('ineedz', false);
scope.$eval();
expect(element.hasClass('ng-validation-error')).toBeFalsy();
@@ -256,7 +256,7 @@ describe("widget", function(){
expect(element.attr('ng-validation-error')).toBeFalsy();
});
- it("should process ng-required2", function() {
+ it("should process ng:required2", function() {
compile('');
expect(scope.$get('name')).toEqual("Misko");
--
cgit v1.2.3