summaryrefslogtreecommitdiff
path: root/spec/helpers/auth_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/auth_helper_spec.rb')
-rw-r--r--spec/helpers/auth_helper_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/helpers/auth_helper_spec.rb b/spec/helpers/auth_helper_spec.rb
index cd3281d6f51..a0e1265efff 100644
--- a/spec/helpers/auth_helper_spec.rb
+++ b/spec/helpers/auth_helper_spec.rb
@@ -62,4 +62,18 @@ describe AuthHelper do
end
end
end
+
+ describe 'unlink_allowed?' do
+ [:saml, :cas3].each do |provider|
+ it "returns true if the provider is #{provider}" do
+ expect(helper.unlink_allowed?(provider)).to be false
+ end
+ end
+
+ [:twitter, :facebook, :google_oauth2, :gitlab, :github, :bitbucket, :crowd, :auth0].each do |provider|
+ it "returns false if the provider is #{provider}" do
+ expect(helper.unlink_allowed?(provider)).to be true
+ end
+ end
+ end
end