quick fix a better solution is to use $timeout mock