From 597d5ed08988cb00681eaf252d04ebae4bd24731 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 26 Jul 2023 12:07:29 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../settings/integrations_controller_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'spec/controllers') diff --git a/spec/controllers/projects/settings/integrations_controller_spec.rb b/spec/controllers/projects/settings/integrations_controller_spec.rb index 8c1cdf784aa..49851c82cc5 100644 --- a/spec/controllers/projects/settings/integrations_controller_spec.rb +++ b/spec/controllers/projects/settings/integrations_controller_spec.rb @@ -379,6 +379,26 @@ RSpec.describe Projects::Settings::IntegrationsController, feature_category: :in end end end + + context 'with chat notification integration which masks channel params' do + let_it_be(:integration) do + create(:discord_integration, project: project, note_channel: 'https://discord.com/api/webhook/note') + end + + let(:message) { 'Discord Notifications settings saved and active.' } + + it_behaves_like 'integration update' + + context 'with masked channel param' do + let(:integration_params) { { active: true, note_channel: '************' } } + + it_behaves_like 'integration update' + + it 'does not update the channel' do + expect(integration.reload.note_channel).to eq('https://discord.com/api/webhook/note') + end + end + end end describe 'as JSON' do -- cgit v1.2.3