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

Stub multiple variable controller method

parent 0b6dead2
......@@ -34,6 +34,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),
......
......@@ -181,7 +181,12 @@ constraints(ProjectUrlConstrainer.new) do
get '/service_desk' => 'service_desk#show', as: :service_desk
put '/service_desk' => 'service_desk#update', as: :service_desk_refresh
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