refactor(stateSpec): add spy on .replace method

make todo tasks in stateSpec.js file:
create spyOn $location.replace method and remove duplicate mocks.