Commit 0106d2f9 authored by Lin Jen-Shin's avatar Lin Jen-Shin

There's little point to check having at least one

argument at all. Feedback:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1942#note_30495480
parent 6a0a4dfe
......@@ -119,8 +119,6 @@ module API
optional :name, type: String, desc: 'The name of the group'
optional :path, type: String, desc: 'The path of the group'
use :optional_params
at_least_one_of(*@declared_params.flatten - [:id])
end
put ':id' do
group = find_group!(params[:id])
......
......@@ -140,8 +140,6 @@ module API
optional :name, type: String, desc: 'The name of the user'
optional :username, type: String, desc: 'The username of the user'
use :optional_attributes
at_least_one_of(*@declared_params.flatten - [:id])
end
put ":id" do
authenticated_as_admin!
......
......@@ -431,7 +431,7 @@ describe API::Users do
expect(response).to have_http_status(200)
expect(json_response['shared_runners_minutes_limit'])
.to eq(133)
expect(user.reload.namespace.shared_runners_minutes_limit).to eq(133)
expect(user.reload.shared_runners_minutes_limit).to eq(133)
end
it "does not update admin status" do
......
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