Commit 55b07533 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 b17843a9
module RedirectRequest module RepositorySettingsRedirect
extend ActiveSupport::Concern extend ActiveSupport::Concern
def redirect_to_repository_settings(project) def redirect_to_repository_settings(project)
......
class Projects::DeployKeysController < Projects::ApplicationController class Projects::DeployKeysController < Projects::ApplicationController
include RedirectRequest include RepositorySettingsRedirect
respond_to :html respond_to :html
# Authorize # Authorize
......
class Projects::ProtectedBranchesController < Projects::ApplicationController class Projects::ProtectedBranchesController < Projects::ApplicationController
include RedirectRequest include RepositorySettingsRedirect
# Authorize # Authorize
before_action :require_non_empty_project before_action :require_non_empty_project
before_action :authorize_admin_project! before_action :authorize_admin_project!
......
...@@ -44,7 +44,7 @@ describe Projects::Settings::DeployKeysPresenter do ...@@ -44,7 +44,7 @@ describe Projects::Settings::DeployKeysPresenter do
expect(presenter.available_project_keys).to be_empty expect(presenter.available_project_keys).to be_empty
end 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) expect(presenter.any_available_project_keys_enabled?).to eq(false)
end 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