$scope
値を取得して別の状態に送信するコントローラーがあります。
controllers.controller('SearchController', ['$scope', '$state', '$stateParams',
function($scope, $state, $stateParams) {
$scope.search = function() {
$stateParams.query = $scope.keyword;
$state.go('search', $stateParams);
};
}]);
この検索方法の単体テストを行う方法がわかりません。when($state.go('search', $stateParams)).then(called = true);
go メソッドが呼び出されたことを確認するか、またはKarma/AngularJS で何らかの操作を行うにはどうすればよいですか?