diff options
author | Valery Sizov <vsv2711@gmail.com> | 2014-12-04 13:55:37 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2014-12-04 14:03:55 +0300 |
commit | b56b96d438c92981cd5c0f5e2f4b23d3799a3bd3 (patch) | |
tree | e38453f64d929b2eb9d24f3630a5425b98d7343e /spec | |
parent | 3a5ed5260b24051939575d1934ce9b8392cac09f (diff) |
added helper
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/oauth_helper_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/helpers/oauth_helper_spec.rb b/spec/helpers/oauth_helper_spec.rb new file mode 100644 index 00000000000..846e65b54e9 --- /dev/null +++ b/spec/helpers/oauth_helper_spec.rb @@ -0,0 +1,17 @@ +require "spec_helper" + +describe OauthHelper do + describe "additional_providers" do + it 'returns appropriate values' do + [ + [[:twitter, :github], [:twitter, :github]], + [[:ldap_main], []], + [[:twitter, :ldap_main], [:twitter]], + [[], []], + ].each do |couple| + allow(helper).to receive(:enabled_oauth_providers) { couple.first } + additional_providers.should include(*couple.last) + end + end + end +end
\ No newline at end of file |