aboutsummaryrefslogtreecommitdiffstats
path: root/test/ScenarioSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ScenarioSpec.js')
-rw-r--r--test/ScenarioSpec.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ScenarioSpec.js b/test/ScenarioSpec.js
index 5b88a175..ff3a55b5 100644
--- a/test/ScenarioSpec.js
+++ b/test/ScenarioSpec.js
@@ -1,26 +1,26 @@
describe("ScenarioSpec: Compilation", function(){
it("should compile dom node and return scope", function(){
var node = jqLite('<div ng-init="a=1">{{b=a+1}}</div>')[0];
- var scope = angular.compile(node);
+ var scope = compile(node);
scope.$init();
expect(scope.a).toEqual(1);
expect(scope.b).toEqual(2);
});
it("should compile jQuery node and return scope", function(){
- var scope = angular.compile(jqLite('<div>{{a=123}}</div>')).$init();
+ var scope = compile(jqLite('<div>{{a=123}}</div>')).$init();
expect(jqLite(scope.$element).text()).toEqual('123');
});
it("should compile text node and return scope", function(){
- var scope = angular.compile('<div>{{a=123}}</div>').$init();
+ var scope = compile('<div>{{a=123}}</div>').$init();
expect(jqLite(scope.$element).text()).toEqual('123');
});
});
describe("ScenarioSpec: Scope", function(){
xit("should have set, get, eval, $init, updateView methods", function(){
- var scope = angular.compile('<div>{{a}}</div>').$init();
+ var scope = compile('<div>{{a}}</div>').$init();
scope.$eval("$invalidWidgets.push({})");
expect(scope.$set("a", 2)).toEqual(2);
expect(scope.$get("a")).toEqual(2);
@@ -31,7 +31,7 @@ describe("ScenarioSpec: Scope", function(){
});
xit("should have $ objects", function(){
- var scope = angular.compile('<div></div>', {a:"b"});
+ var scope = compile('<div></div>', {a:"b"});
expect(scope.$get('$anchor')).toBeDefined();
expect(scope.$get('$eval')).toBeDefined();
expect(scope.$get('$config')).toBeDefined();
@@ -49,7 +49,7 @@ xdescribe("ScenarioSpec: configuration", function(){
set:function(u){url = u;},
get:function(){return url;}
};
- var scope = angular.compile("<div>{{$anchor}}</div>", {location:location});
+ var scope = compile("<div>{{$anchor}}</div>", {location:location});
var $anchor = scope.$get('$anchor');
expect($anchor.book).toBeUndefined();
expect(onUrlChange).toBeUndefined();