Commit d7eefd11 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Pass current_user to present method to add admin exclusive fields

parent a0f9e4d6
......@@ -17,7 +17,7 @@ module API
namespaces = namespaces.search(params[:search]) if params[:search].present?
present paginate(namespaces), with: Entities::Namespace
present paginate(namespaces), with: Entities::Namespace, current_user: current_user
end
desc 'Update a namespace' do
......
......@@ -20,7 +20,8 @@ describe API::Namespaces do
expect(response).to have_http_status(200)
expect(response).to include_pagination_headers
expect(json_response.first).to include('id', 'name', 'path', 'full_path', 'parent_id', 'members_count')
expect(json_response.first).to include('id', 'name', 'path', 'full_path', 'parent_id',
'members_count', 'shared_runners_minutes_limit', 'plan')
end
it "admin: returns an array of all namespaces" 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