aboutsummaryrefslogtreecommitdiffstats
path: root/test/ScenarioSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2011-02-07 15:29:56 -0800
committerMisko Hevery2011-02-16 00:49:15 -0500
commit23b255a8b7481ff5c06004b3558c07f981c42276 (patch)
tree57e612f658c9f8903d93a28e9095590178e2ce3a /test/ScenarioSpec.js
parente2154cbc0b9265bea04ce328879d4e9bf1c67c51 (diff)
downloadangular.js-23b255a8b7481ff5c06004b3558c07f981c42276.tar.bz2
remove $init on scope from applying compilation template
Closes #40
Diffstat (limited to 'test/ScenarioSpec.js')
-rw-r--r--test/ScenarioSpec.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/ScenarioSpec.js b/test/ScenarioSpec.js
index 50b5e51c..cd1e3115 100644
--- a/test/ScenarioSpec.js
+++ b/test/ScenarioSpec.js
@@ -13,25 +13,24 @@ 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];
scope = compile(node);
- scope.$init();
expect(scope.a).toEqual(1);
expect(scope.b).toEqual(2);
});
it("should compile jQuery node and return scope", function(){
- scope = compile(jqLite('<div>{{a=123}}</div>')).$init();
+ scope = compile(jqLite('<div>{{a=123}}</div>'));
expect(jqLite(scope.$element).text()).toEqual('123');
});
it("should compile text node and return scope", function(){
- scope = compile('<div>{{a=123}}</div>').$init();
+ scope = compile('<div>{{a=123}}</div>');
expect(jqLite(scope.$element).text()).toEqual('123');
});
});
describe('scope', function(){
- it("should have set, get, eval, $init, updateView methods", function(){
- scope = compile('<div>{{a}}</div>').$init();
+ it("should have $set, $get, $eval, $updateView methods", function(){
+ scope = compile('<div>{{a}}</div>');
scope.$eval("$invalidWidgets.push({})");
expect(scope.$set("a", 2)).toEqual(2);
expect(scope.$get("a")).toEqual(2);