aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/servicesSpec.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/servicesSpec.js b/test/servicesSpec.js
index 70645caf..e3437dc2 100644
--- a/test/servicesSpec.js
+++ b/test/servicesSpec.js
@@ -410,6 +410,14 @@ describe("service", function(){
expect($route.current.template).toEqual('instant update');
});
+ it('should return fn registered with onChange()', function() {
+ var scope = angular.scope(),
+ $route = scope.$service('$route'),
+ fn = function() {};
+
+ expect($route.onChange(fn)).toBe(fn);
+ });
+
it('should allow routes to be defined with just templates without controllers', function() {
var scope = angular.scope(),
$location = scope.$service('$location'),