From d934054cfc22325d817eb0643dc061f9d212804d Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 25 Mar 2010 22:03:11 -0700 Subject: major refactoring of scope --- test/markupSpec.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'test/markupSpec.js') diff --git a/test/markupSpec.js b/test/markupSpec.js index 8ea88f08..c83f27ff 100644 --- a/test/markupSpec.js +++ b/test/markupSpec.js @@ -8,9 +8,8 @@ describe("markups", function(){ var compiler = new Compiler(angularTextMarkup, angularAttrMarkup, angularDirective, angularWidget); compile = function(html) { element = jqLite(html); - var view = compiler.compile(element)(element); - view.init(); - scope = view.scope; + scope = compiler.compile(element)(element); + scope.$init(); }; }); @@ -24,16 +23,16 @@ describe("markups", function(){ it('should translate {{}} in text', function(){ compile('
');
expect(element.attr('src')).toEqual();
expect(element.attr('ng-bind-attr')).toEqual('{"src":"http://server/{{path}}.png"}');
- scope.set('path', 'a/b');
- scope.updateView();
+ scope.$set('path', 'a/b');
+ scope.$eval();
expect(element.attr('src')).toEqual("http://server/a/b.png");
});
--
cgit v1.2.3