From bf7c9d9900ba78a2c881caacc4be9ab43469663e Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 4 Feb 2011 13:29:24 -0800 Subject: $route.onChange should return the registered fn --- test/servicesSpec.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') 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'), -- cgit v1.2.3