diff options
author | Ryan Cobb <rcobb@gitlab.com> | 2019-10-08 01:07:18 +0300 |
---|---|---|
committer | Ryan Cobb <rcobb@gitlab.com> | 2019-10-17 00:20:47 +0300 |
commit | 576818b578be87a90c60c1e734fd5f6df48bb82f (patch) | |
tree | ccf29823c63f6f6837a91f21b8df78c20a91328f /spec/services/projects | |
parent | 7e2b1008547d8ced97a30e96ac6fbc2b7ad32a7f (diff) |
Mask Sentry auth token
This makes it so we mask Sentry's auth token. This mask only occurs in
the UI.
Diffstat (limited to 'spec/services/projects')
-rw-r--r-- | spec/services/projects/operations/update_service_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/services/projects/operations/update_service_spec.rb b/spec/services/projects/operations/update_service_spec.rb index b2f9fd6df79..81d59a98b9b 100644 --- a/spec/services/projects/operations/update_service_spec.rb +++ b/spec/services/projects/operations/update_service_spec.rb @@ -145,6 +145,27 @@ describe Projects::Operations::UpdateService do end end + context 'with masked param token' do + let(:params) do + { + error_tracking_setting_attributes: { + enabled: false, + token: '*' * 8 + } + } + end + + before do + create(:project_error_tracking_setting, project: project, token: 'token') + end + + it 'does not update token' do + expect(result[:status]).to eq(:success) + + expect(project.error_tracking_setting.token).to eq('token') + end + end + context 'with invalid parameters' do let(:params) { {} } |