File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ def environment_urls
6767 def user_info
6868 @user_info ||=
6969 OmniAuth ::EbayOauth ::UserInfo . new ( OmniAuth ::EbayOauth ::UserInfoRequest
70- . new ( access_token . token , client . options ) . call )
70+ . new ( access_token . token , ** client . options ) . call )
7171 end
7272 end
7373 end
Original file line number Diff line number Diff line change 55RSpec . describe OmniAuth ::Strategies ::EbayOauth do
66 let ( :options ) { { } }
77
8+ before { subject . setup_phase }
9+
810 subject { described_class . new ( nil , options ) }
911
1012 describe '#callback_url' do
1618 end
1719
1820 describe '#options' do
19- before { subject . setup_phase }
20-
2121 it 'default mode is sandbox' do
2222 expect ( subject . options . client_options . user_info_endpoint )
2323 . to eq ( 'https://api.sandbox.ebay.com/ws/api.dll' )
112112 describe '#user_info' do
113113 let ( :access_token ) { instance_double ( OAuth2 ::AccessToken , token : :token ) }
114114 let ( :user_info ) { instance_double ( OmniAuth ::EbayOauth ::UserInfo ) }
115- let ( :request ) do
116- instance_double ( OmniAuth ::EbayOauth ::UserInfoRequest , call : { } )
117- end
118115
119116 before do
120117 expect ( subject ) . to receive ( :access_token ) . and_return ( access_token )
121- expect ( OmniAuth ::EbayOauth ::UserInfoRequest )
122- . to receive ( :new ) . and_return ( request )
123- expect ( OmniAuth ::EbayOauth ::UserInfo )
118+ allow_any_instance_of ( OmniAuth ::EbayOauth ::UserInfoRequest )
119+ . to receive ( :call ) . and_return ( { } )
120+ allow ( OmniAuth ::EbayOauth ::UserInfo )
124121 . to receive ( :new ) . with ( { } ) . and_return ( user_info )
125122 end
126123
You can’t perform that action at this time.
0 commit comments