test $scope.$apply