2014-12-04 05:55:37 -05:00
|
|
|
require "spec_helper"
|
|
|
|
|
|
|
|
describe OauthHelper do
|
|
|
|
describe "additional_providers" do
|
2014-12-04 06:43:08 -05:00
|
|
|
it 'returns all enabled providers' do
|
|
|
|
allow(helper).to receive(:enabled_oauth_providers) { [:twitter, :github] }
|
|
|
|
helper.additional_providers.should include(*[:twitter, :github])
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'does not return ldap provider' do
|
|
|
|
allow(helper).to receive(:enabled_oauth_providers) { [:twitter, :ldapmain] }
|
|
|
|
helper.additional_providers.should include(:twitter)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'returns empty array' do
|
|
|
|
allow(helper).to receive(:enabled_oauth_providers) { [] }
|
|
|
|
helper.additional_providers.should == []
|
2014-12-04 05:55:37 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|