Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/auth/saml/config_spec.rb')
-rw-r--r--spec/lib/gitlab/auth/saml/config_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/lib/gitlab/auth/saml/config_spec.rb b/spec/lib/gitlab/auth/saml/config_spec.rb
new file mode 100644
index 00000000000..12f5da48873
--- /dev/null
+++ b/spec/lib/gitlab/auth/saml/config_spec.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::Auth::Saml::Config do
+ describe '.enabled?' do
+ subject { described_class.enabled? }
+
+ it { is_expected.to eq(false) }
+
+ context 'when SAML is enabled' do
+ before do
+ allow(Gitlab::Auth::OAuth::Provider).to receive(:providers).and_return([:saml])
+ end
+
+ it { is_expected.to eq(true) }
+ end
+ end
+end