mock-angular.js
function responsePromise(response) {
				response.status = response.status || 200;
				return $q(function(resolve, reject) {
					(response.status >= 200 && response.status <= 299 ? resolve : reject)(response);
				});
			}
function responsePromise(response) {
				response.status = response.status || 200;
				return $q(function(resolve, reject) {
					(response.status >= 200 && response.status <= 299 ? resolve : reject)(response);
				});
			}
function responsePromise ( response ) { response . status = response . status || 200 ; return $q ( function ( resolve , reject ) { ( response . status >= 200 && response . status <= 299 ? resolve : reject ) ( response ) ; } ) ; }
Create promise for mock response
@param response
@returns {*}
Create promise for mock response