diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-24 21:09:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-24 21:09:14 +0300 |
commit | ca386bfc0cf083e0ccb477995378061fc2a15b66 (patch) | |
tree | f53d4a2f288ba64e9f440080817f14d62965398c /spec/helpers | |
parent | 61ebd5753018a1f4b6032122f6ea625dc4e4fc8e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/admin/abuse_reports_helper_spec.rb | 2 | ||||
-rw-r--r-- | spec/helpers/resource_events/abuse_report_events_helper_spec.rb | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/spec/helpers/admin/abuse_reports_helper_spec.rb b/spec/helpers/admin/abuse_reports_helper_spec.rb index 496b7361b6e..6a7630dc76a 100644 --- a/spec/helpers/admin/abuse_reports_helper_spec.rb +++ b/spec/helpers/admin/abuse_reports_helper_spec.rb @@ -28,7 +28,7 @@ RSpec.describe Admin::AbuseReportsHelper, feature_category: :insider_threat do subject(:data) { helper.abuse_report_data(report)[:abuse_report_data] } it 'has the expected attributes' do - expect(data).to include('user', 'reporter', 'report', 'actions') + expect(data).to include('user', 'reporter', 'report') end end end diff --git a/spec/helpers/resource_events/abuse_report_events_helper_spec.rb b/spec/helpers/resource_events/abuse_report_events_helper_spec.rb new file mode 100644 index 00000000000..f711fb6773c --- /dev/null +++ b/spec/helpers/resource_events/abuse_report_events_helper_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe ResourceEvents::AbuseReportEventsHelper, feature_category: :instance_resiliency do + describe '#success_message_for_action' do + using RSpec::Parameterized::TableSyntax + + where(:action, :action_value) do + ResourceEvents::AbuseReportEvent.actions.to_a + end + + with_them do + it { expect(helper.success_message_for_action(action)).not_to be_nil } + end + end +end |