Commit fe96a1f2 authored by Matija Čupić's avatar Matija Čupić

Stub multiple variable controller method

parent 2150ed40
......@@ -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),
......
......@@ -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
......
......@@ -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
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