Commit dd0589f8 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Renamed the redirect_request concern to repository_settings_redirect

Also fixed naming of a test in the deploy_keys_presenter
parent b2bbb997
module RedirectRequest
module RepositorySettingsRedirect
extend ActiveSupport::Concern
def redirect_to_repository_settings(project)
......
class Projects::DeployKeysController < Projects::ApplicationController
include RedirectRequest
include RepositorySettingsRedirect
respond_to :html
# Authorize
......
class Projects::MirrorsController < Projects::ApplicationController
include RedirectRequest
include RepositorySettingsRedirect
# Authorize
before_action :authorize_admin_project!, except: [:update_now]
before_action :authorize_push_code!, only: [:update_now]
......
class Projects::ProtectedBranchesController < Projects::ApplicationController
include RedirectRequest
include RepositorySettingsRedirect
# Authorize
before_action :require_non_empty_project
before_action :authorize_admin_project!
......
class Projects::PushRulesController < Projects::ApplicationController
include RedirectRequest
include RepositorySettingsRedirect
# Authorize
before_action :authorize_admin_project!
......
......@@ -44,7 +44,7 @@ describe Projects::Settings::DeployKeysPresenter do
expect(presenter.available_project_keys).to be_empty
end
it 'returns if any available_project_keys are enabled' do
it 'returns false if any available_project_keys are enabled' do
expect(presenter.any_available_project_keys_enabled?).to eq(false)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment