Commit c3538370 authored by Amparo Luna's avatar Amparo Luna Committed by Mark Chao

Display seat counts stored in GitlabSubscription

Since we're now updating seats_in_use and seats_owed along with
max_seats_used during the daily job.
parent 6f019a70
---
title: Return stored seat counts in the subscriptions API endpoint
merge_request: 42293
author:
type: fixed
...@@ -14,9 +14,9 @@ module EE ...@@ -14,9 +14,9 @@ module EE
expose :usage do expose :usage do
expose :seats, as: :seats_in_subscription expose :seats, as: :seats_in_subscription
expose :calculate_seats_in_use, as: :seats_in_use expose :seats_in_use
expose :max_seats_used expose :max_seats_used
expose :calculate_seats_owed, as: :seats_owed expose :seats_owed
end end
expose :billing do expose :billing do
......
...@@ -285,7 +285,7 @@ RSpec.describe API::Namespaces do ...@@ -285,7 +285,7 @@ RSpec.describe API::Namespaces do
end end
context 'when authenticated as a regular user' do context 'when authenticated as a regular user' do
it 'returns an unauthroized error' do it 'returns an unauthorized error' do
do_post(user, params) do_post(user, params)
expect(response).to have_gitlab_http_status(:forbidden) expect(response).to have_gitlab_http_status(:forbidden)
...@@ -347,7 +347,7 @@ RSpec.describe API::Namespaces do ...@@ -347,7 +347,7 @@ RSpec.describe API::Namespaces do
end end
context 'with a regular user' do context 'with a regular user' do
it 'returns an unauthroized error' do it 'returns an unauthorized error' do
do_get(developer) do_get(developer)
expect(response).to have_gitlab_http_status(:forbidden) expect(response).to have_gitlab_http_status(:forbidden)
...@@ -401,7 +401,7 @@ RSpec.describe API::Namespaces do ...@@ -401,7 +401,7 @@ RSpec.describe API::Namespaces do
end end
context 'when authenticated as a regular user' do context 'when authenticated as a regular user' do
it 'returns an unauthroized error' do it 'returns an unauthorized error' do
do_put(namespace.id, user, { seats: 150 }) do_put(namespace.id, user, { seats: 150 })
expect(response).to have_gitlab_http_status(:forbidden) expect(response).to have_gitlab_http_status(:forbidden)
......
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