Welcome to mirror list, hosted at ThFree Co, Russian Federation.

authorization_helpers.rb « controllers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e1786e0ca8aeaa720e291d24aed44f577e4f3513 (plain)
1
2
3
4
5
6
# frozen_string_literal: true

def forbid_controller_ability!(ability)
  allow(controller).to receive(:can?).and_call_original
  allow(controller).to receive(:can?).with(anything, ability, any_args).and_return(false)
end