diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-26 15:07:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-26 15:07:29 +0300 |
commit | 597d5ed08988cb00681eaf252d04ebae4bd24731 (patch) | |
tree | fa6c90ecda00858be51b790dad9e4d9098d29fdb /spec/controllers | |
parent | e2cf652edb5e9d9fa9a081952070074c07bf651e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/settings/integrations_controller_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
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 |