spec/omniauth/strategies/twitter_spec.rb in omniauth-twitter-0.0.14 vs spec/omniauth/strategies/twitter_spec.rb in omniauth-twitter-0.0.15

- old
+ new

@@ -16,6 +16,21 @@ it 'should have correct authorize url' do expect(subject.options.client_options.authorize_path).to eq('/oauth/authenticate') end end + + describe 'request_phase' do + context 'no request params set and x_auth_access_type specified' do + before do + subject.options[:request_params] = nil + subject.stub(:session).and_return( + {'omniauth.params' => {'x_auth_access_type' => 'read'}}) + subject.stub(:old_request_phase).and_return(:whatever) + end + + it 'should not break' do + expect { subject.request_phase }.not_to raise_error + end + end + end end