Sha256: ba7f8c6f08e05a9139b2871a0eb2e1a396a1ed6f1fbb16e51decb0f10da99995
Contents?: true
Size: 1.23 KB
Versions: 2
Compression:
Stored size: 1.23 KB
Contents
require 'spec_helper' require 'omniauth-paypal' describe OmniAuth::Strategies::PayPal do subject do OmniAuth::Strategies::PayPal.new(nil, @options || {}) end it_should_behave_like 'an oauth2 strategy' describe '#client' do it 'has correct PayPal site' do subject.client.site.should eq('https://api.paypal.com') end it 'has correct PayPal sandbox site' do @options = { :sandbox => true } subject.setup_phase subject.client.site.should eq('https://api.sandbox.paypal.com') end it 'has correct authorize url' do subject.client.options[:authorize_url].should eq('https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize') end it 'has correct sandbox authorize url' do @options = { :sandbox => true } subject.setup_phase subject.client.options[:authorize_url].should eq('https://www.sandbox.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize') end it 'has correct token url' do subject.client.options[:token_url].should eq('/v1/identity/openidconnect/tokenservice') end end describe '#callback_path' do it "has the correct callback path" do subject.callback_path.should eq('/auth/paypal/callback') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
omniauth-paypal-1.2.1 | spec/omniauth/strategies/paypal_spec.rb |
omniauth-paypal-1.2 | spec/omniauth/strategies/paypal_spec.rb |