diff options
-rw-r--r-- | app/controllers/projects/variables_controller.rb | 4 | ||||
-rw-r--r-- | config/routes/project.rb | 7 | ||||
-rw-r--r-- | spec/controllers/projects/variables_controller_spec.rb | 7 |
3 files changed, 17 insertions, 1 deletions
diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb index 6a825137564..b7b88830837 100644 --- a/app/controllers/projects/variables_controller.rb +++ b/app/controllers/projects/variables_controller.rb @@ -32,6 +32,10 @@ class Projects::VariablesController < Projects::ApplicationController end end + def save_multiple + head :ok + end + def destroy if variable.destroy redirect_to project_settings_ci_cd_path(project), diff --git a/config/routes/project.rb b/config/routes/project.rb index bcaa68c8ce5..8b65240ade4 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -156,7 +156,12 @@ constraints(ProjectUrlConstrainer.new) do end end - resources :variables, only: [:index, :show, :update, :create, :destroy] + resources :variables, only: [:index, :show, :update, :create, :destroy] do + collection do + post :save_multiple + end + end + resources :triggers, only: [:index, :create, :edit, :update, :destroy] do member do post :take_ownership diff --git a/spec/controllers/projects/variables_controller_spec.rb b/spec/controllers/projects/variables_controller_spec.rb index 9fde6544215..97284909b3c 100644 --- a/spec/controllers/projects/variables_controller_spec.rb +++ b/spec/controllers/projects/variables_controller_spec.rb @@ -55,4 +55,11 @@ describe Projects::VariablesController do end end end + + describe 'POST #save_multiple' do + it 'returns a successful response' do + post :save_multiple, namespace_id: project.namespace.to_param, project_id: project + expect(response).to have_gitlab_http_status(:ok) + end + end end |