Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-20 14:18:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-20 14:18:08 +0300
commit5afcbe03ead9ada87621888a31a62652b10a7e4f (patch)
tree9918b67a0d0f0bafa6542e839a8be37adf73102d /spec/serializers/admin/abuse_report_entity_spec.rb
parentc97c0201564848c1f53226fe19d71fdcc472f7d0 (diff)
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'spec/serializers/admin/abuse_report_entity_spec.rb')
-rw-r--r--spec/serializers/admin/abuse_report_entity_spec.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/serializers/admin/abuse_report_entity_spec.rb b/spec/serializers/admin/abuse_report_entity_spec.rb
index c7f57258f40..e84cfe73b96 100644
--- a/spec/serializers/admin/abuse_report_entity_spec.rb
+++ b/spec/serializers/admin/abuse_report_entity_spec.rb
@@ -15,15 +15,16 @@ RSpec.describe Admin::AbuseReportEntity, feature_category: :insider_threat do
subject(:entity_hash) { entity.as_json }
it 'exposes correct attributes' do
- expect(entity_hash.keys).to include(
+ expect(entity_hash.keys).to match_array([
:category,
:created_at,
:updated_at,
:count,
+ :labels,
:reported_user,
:reporter,
:report_path
- )
+ ])
end
it 'correctly exposes `reported user`' do
@@ -37,5 +38,15 @@ RSpec.describe Admin::AbuseReportEntity, feature_category: :insider_threat do
it 'correctly exposes :report_path' do
expect(entity_hash[:report_path]).to eq admin_abuse_report_path(abuse_report)
end
+
+ context 'when abuse_report_labels feature flag is disabled' do
+ before do
+ stub_feature_flags(abuse_report_labels: false)
+ end
+
+ it 'does not expose labels' do
+ expect(entity_hash.keys).not_to include(:labels)
+ end
+ end
end
end