This should fix the test case as $rootScope.q was 'undefined'