diff options
author | Andreas Kämmerle <andreas.kaemmerle@gmail.com> | 2018-09-13 12:00:59 +0200 |
---|---|---|
committer | Andreas Kämmerle <andreas.kaemmerle@gmail.com> | 2018-09-13 12:00:59 +0200 |
commit | 87d01cc3bfc12c08024881dc8f13101e5430e3e6 (patch) | |
tree | 05e82defa51500257f97e3530862da03668895e3 /spec/models/application_setting_spec.rb | |
parent | fef5c923c009c64183cc43909444a1bdaba218b7 (diff) | |
parent | 71f3d48544cc0857c8d470b182f7e809de6a4642 (diff) | |
download | gitlab-ce-consolidate-page-widths-part02.tar.gz |
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into consolidate-page-widths-part02consolidate-page-widths-part02
Diffstat (limited to 'spec/models/application_setting_spec.rb')
-rw-r--r-- | spec/models/application_setting_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index 483cc546423..9647c1b9f63 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -305,6 +305,36 @@ describe ApplicationSetting do end end + describe 'setting Sentry DSNs' do + context 'server DSN' do + it 'strips leading and trailing whitespace' do + subject.update(sentry_dsn: ' http://test ') + + expect(subject.sentry_dsn).to eq('http://test') + end + + it 'handles nil values' do + subject.update(sentry_dsn: nil) + + expect(subject.sentry_dsn).to be_nil + end + end + + context 'client-side DSN' do + it 'strips leading and trailing whitespace' do + subject.update(clientside_sentry_dsn: ' http://test ') + + expect(subject.clientside_sentry_dsn).to eq('http://test') + end + + it 'handles nil values' do + subject.update(clientside_sentry_dsn: nil) + + expect(subject.clientside_sentry_dsn).to be_nil + end + end + end + describe '#disabled_oauth_sign_in_sources=' do before do allow(Devise).to receive(:omniauth_providers).and_return([:github]) |