spec/omniauth/strategies/stripe_connect_spec.rb in omniauth-stripe-connect-2.10.0 vs spec/omniauth/strategies/stripe_connect_spec.rb in omniauth-stripe-connect-2.10.1
- old
+ new
@@ -1,9 +1,9 @@
require 'spec_helper'
describe OmniAuth::Strategies::StripeConnect do
- let(:fresh_strategy){ Class.new(OmniAuth::Strategies::StripeConnect) }
+ let(:fresh_strategy) { Class.new(OmniAuth::Strategies::StripeConnect) }
before(:each) do
OmniAuth.config.test_mode = true
@old_host = OmniAuth.config.full_host
@@ -67,8 +67,19 @@
it 'should not include redirect_uri by default' do
instance = subject.new('abc', 'def')
instance.authorize_params
expect(instance.token_params[:redirect_uri]).to be_nil
+ end
+ end
+
+ describe '#callback_url' do
+ subject { fresh_strategy }
+ OmniAuth.config.full_host = 'https://foo.com/'
+
+ it 'returns a url with the host and path' do
+ instance = subject.new('abc', 'def', :callback_path => 'bar/baz')
+ instance.authorize_params
+ expect(instance.callback_url).to eq 'https://foo.com/bar/baz'
end
end
end