testing $rootScope functionality