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/BinderTest.js | 10 +++++----- test/FiltersTest.js | 6 +++--- test/ValidatorsTest.js | 6 +++--- test/delete/WidgetsTest.js | 6 +++--- test/servicesSpec.js | 2 +- test/widgetsSpec.js | 42 +++++++++++++++++++++--------------------- 6 files changed, 36 insertions(+), 36 deletions(-) (limited to 'test') diff --git a/test/BinderTest.js b/test/BinderTest.js index ef1ef362..1b1201fa 100644 --- a/test/BinderTest.js +++ b/test/BinderTest.js @@ -42,7 +42,7 @@ BinderTest.prototype.testChangingRadioUpdatesModel = function(){ }; BinderTest.prototype.testChangingCheckboxUpdatesModel = function(){ - var form = this.compile(''); + var form = this.compile(''); assertEquals(true, form.scope.model.price); }; @@ -508,8 +508,8 @@ BinderTest.prototype.testFillInOptionValueWhenMissing = function() { }; BinderTest.prototype.testValidateForm = function() { - var c = this.compile('
' + - '
'); + var c = this.compile('
' + + '
'); var items = [{}, {}]; c.scope.$set("items", items); c.scope.$eval(); @@ -537,7 +537,7 @@ BinderTest.prototype.testValidateForm = function() { }; BinderTest.prototype.testValidateOnlyVisibleItems = function(){ - var c = this.compile('
'); + var c = this.compile('
'); jqLite(document.body).append(c.node); c.scope.$set("show", true); c.scope.$eval(); @@ -660,7 +660,7 @@ BinderTest.prototype.XtestItShouldRenderMultiRootHtmlInBinding = function() { }; BinderTest.prototype.testItShouldUseFormaterForText = function() { - var x = this.compile(''); + var x = this.compile(''); x.scope.$eval(); assertEquals(['a','b'], x.scope.$get('a')); var input = x.node; diff --git a/test/FiltersTest.js b/test/FiltersTest.js index f839bb51..903a7a2f 100644 --- a/test/FiltersTest.js +++ b/test/FiltersTest.js @@ -6,11 +6,11 @@ FiltersTest.prototype.testCurrency = function(){ var currency = bind(context, angular.filter.currency); assertEquals(currency(0), '$0.00'); - assertEquals(html.hasClass('ng-format-negative'), false); + assertEquals(html.hasClass('ng:format-negative'), false); assertEquals(currency(-999), '$-999.00'); - assertEquals(html.hasClass('ng-format-negative'), true); + assertEquals(html.hasClass('ng:format-negative'), true); assertEquals(currency(1234.5678), '$1,234.57'); - assertEquals(html.hasClass('ng-format-negative'), false); + assertEquals(html.hasClass('ng:format-negative'), false); }; FiltersTest.prototype.testFilterThisIsContext = function(){ diff --git a/test/ValidatorsTest.js b/test/ValidatorsTest.js index 573c340d..2e156f84 100644 --- a/test/ValidatorsTest.js +++ b/test/ValidatorsTest.js @@ -7,7 +7,7 @@ ValidatorTest.prototype.testItShouldHaveThisSet = function() { validator.last = last; validator._this = this; }; - var scope = compile(''); + var scope = compile(''); scope.name = 'misko'; scope.$init(); assertEquals('misko', validator.first); @@ -109,7 +109,7 @@ describe('Validator:asynchronous', function(){ it('should make a request and show spinner', function(){ var value, fn; - var scope = compile(''); + var scope = compile(''); scope.$init(); var input = scope.$element; scope.asyncFn = function(v,f){ @@ -151,7 +151,7 @@ describe('Validator:asynchronous', function(){ }); it("should handle update function", function(){ - var scope = angular.compile(''); + var scope = angular.compile(''); scope.asyncFn = jasmine.createSpy(); scope.updateFn = jasmine.createSpy(); scope.name = 'misko'; diff --git a/test/delete/WidgetsTest.js b/test/delete/WidgetsTest.js index 9acc6126..ccc87afd 100644 --- a/test/delete/WidgetsTest.js +++ b/test/delete/WidgetsTest.js @@ -1,7 +1,7 @@ WidgetTest = TestCase('WidgetTest'); WidgetTest.prototype.testRequired = function () { - var view = $(''); + var view = $(''); var scope = new Scope({$invalidWidgets:[]}); var cntl = new TextController(view[0], 'a', angularFormatter.noop); cntl.updateView(scope); @@ -14,7 +14,7 @@ WidgetTest.prototype.testRequired = function () { }; WidgetTest.prototype.testValidator = function () { - var view = $(''); + var view = $(''); var scope = new Scope({$invalidWidgets:[]}); var cntl = new TextController(view[0], 'a', angularFormatter.noop); angular.validator.testValidator = function(value, expect){ @@ -42,7 +42,7 @@ WidgetTest.prototype.testValidator = function () { }; WidgetTest.prototype.testRequiredValidator = function () { - var view = $(''); + var view = $(''); var scope = new Scope({$invalidWidgets:[]}); var cntl = new TextController(view[0], 'a', angularFormatter.noop); angular.validator.testValidator = function(value, expect){ diff --git a/test/servicesSpec.js b/test/servicesSpec.js index f679a39b..32e7812a 100644 --- a/test/servicesSpec.js +++ b/test/servicesSpec.js @@ -136,7 +136,7 @@ describe("service", function(){ describe("$invalidWidgets", function(){ it("should count number of invalid widgets", function(){ - var scope = compile('').$init(); + var scope = compile('').$init(); expect(scope.$invalidWidgets.length).toEqual(1); scope.price = 123; scope.$eval(); 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