summaryrefslogtreecommitdiff
path: root/spec/helpers/application_settings_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/application_settings_helper_spec.rb')
-rw-r--r--spec/helpers/application_settings_helper_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/helpers/application_settings_helper_spec.rb b/spec/helpers/application_settings_helper_spec.rb
index 705523f1110..8303c4eafbe 100644
--- a/spec/helpers/application_settings_helper_spec.rb
+++ b/spec/helpers/application_settings_helper_spec.rb
@@ -36,4 +36,27 @@ describe ApplicationSettingsHelper do
it_behaves_like 'when HTTP protocol is in use', 'https'
it_behaves_like 'when HTTP protocol is in use', 'http'
+
+ context 'with tracking parameters' do
+ it { expect(visible_attributes).to include(*%i(snowplow_collector_hostname snowplow_cookie_domain snowplow_enabled snowplow_app_id)) }
+ end
+
+ describe '.integration_expanded?' do
+ let(:application_setting) { build(:application_setting) }
+
+ it 'is expanded' do
+ application_setting.plantuml_enabled = true
+ application_setting.valid?
+ helper.instance_variable_set(:@application_setting, application_setting)
+
+ expect(helper.integration_expanded?('plantuml_')).to be_truthy
+ end
+
+ it 'is not expanded' do
+ application_setting.valid?
+ helper.instance_variable_set(:@application_setting, application_setting)
+
+ expect(helper.integration_expanded?('plantuml_')).to be_falsey
+ end
+ end
end