aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets.js2
-rw-r--r--test/widgetsSpec.js1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets.js b/src/widgets.js
index 3e9ba236..012f13e2 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -225,5 +225,7 @@ angularWidget('NG:SWITCH', function ngSwitch(element){
return on == when;
},
route: function(on, when) {
+ this.name = 'misko';
+ return true;
}
});
diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js
index 93c7adda..88ca3f87 100644
--- a/test/widgetsSpec.js
+++ b/test/widgetsSpec.js
@@ -210,6 +210,7 @@ describe('ng:switch', function(){
var scope = compile('<ng:switch on="url" using="route"><div ng-switch-when="/Book/:name">{{name}}</div></ng:include>');
scope.url = '/Book/Moby';
scope.$init();
+// jstestdriver.console.log('text');
expect(scope.$element.text()).toEqual('Moby');
});