karma test added for controller with sinon mock