diff options
Diffstat (limited to 'spec/requests/api/user_counts_spec.rb')
-rw-r--r-- | spec/requests/api/user_counts_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/requests/api/user_counts_spec.rb b/spec/requests/api/user_counts_spec.rb index ab2aa87d1b7..27ebf02dd81 100644 --- a/spec/requests/api/user_counts_spec.rb +++ b/spec/requests/api/user_counts_spec.rb @@ -43,6 +43,21 @@ RSpec.describe API::UserCounts do expect(response).to have_gitlab_http_status(:ok) expect(json_response).to be_a Hash expect(json_response['merge_requests']).to eq(2) + expect(json_response['attention_requests']).to eq(2) + end + + describe 'mr_attention_requests is disabled' do + before do + stub_feature_flags(mr_attention_requests: false) + end + + it 'does not include attention_requests count' do + create(:merge_request, source_project: project, author: user, assignees: [user]) + + get api('/user_counts', user) + + expect(json_response.key?('attention_requests')).to be(false) + end end end |