From ef4bb28be13e99f96c9ace5936cf26a174a0e5f0 Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Sat, 12 Feb 2011 10:13:28 -0800
Subject: Change API angular.compile(element)([scope], [element/true])
---
test/ValidatorsSpec.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
(limited to 'test/ValidatorsSpec.js')
diff --git a/test/ValidatorsSpec.js b/test/ValidatorsSpec.js
index 65b93133..2d4fca98 100644
--- a/test/ValidatorsSpec.js
+++ b/test/ValidatorsSpec.js
@@ -7,7 +7,7 @@ describe('ValidatorTest', function(){
validator.last = last;
validator._this = this;
};
- var scope = compile('');
+ var scope = compile('')().scope;
scope.name = 'misko';
scope.$eval();
assertEquals('misko', validator.first);
@@ -95,7 +95,7 @@ describe('ValidatorTest', function(){
beforeEach(function(){
value = null;
fn = null;
- self = compile('');
+ self = angular.compile('')().scope;
jqLite(document.body).append(self.$element);
self.$element.data('$validate', noop);
self.$root = self;
@@ -107,7 +107,8 @@ describe('ValidatorTest', function(){
it('should make a request and show spinner', function(){
var value, fn;
- var scope = compile('');
+ var scope = angular.compile(
+ '')().scope;
jqLite(document.body).append(scope.$element);
var input = scope.$element;
scope.asyncFn = function(v,f){
@@ -149,7 +150,8 @@ describe('ValidatorTest', function(){
});
it("should handle update function", function(){
- var scope = angular.compile('');
+ var scope = angular.compile(
+ '')().scope;
scope.asyncFn = jasmine.createSpy();
scope.updateFn = jasmine.createSpy();
scope.name = 'misko';
--
cgit v1.2.3