From 22d1464d7abc284dd56d6beaf47e8d85088e01c5 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 13 May 2010 13:57:39 -0700 Subject: fixed issue with radio view clobering model if radio was checked. --- test/widgetsSpec.js | 70 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 21 deletions(-) (limited to 'test/widgetsSpec.js') diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js index 9df024cb..ecea6223 100644 --- a/test/widgetsSpec.js +++ b/test/widgetsSpec.js @@ -8,7 +8,7 @@ describe("widget", function(){ compile = function(html, before) { element = jqLite(html); scope = compiler.compile(element)(element); - (before||noop)(); + (before||noop).apply(scope); scope.$init(); }; }); @@ -222,29 +222,57 @@ describe("widget", function(){ expect(scope.checkbox).toEqual(true); }); - it('should support type="radio"', function(){ - compile('