require 'spec_helper' describe "OmniAuth::Strategies::Polaris" do class MyPolarisProvider < OmniAuth::Strategies::Polaris; end def app Rack::Builder.new { use OmniAuth::Test::PhonySession use MyPolarisProvider, :name => 'polaris', :title => 'MyPolaris Form', :http_uri => 'http://blah.org/PAPIService/REST/public/v1/1000/100/1/patron/', :access_key => 'F9998888-A000-1111-C22C-CC3333BB4444', :access_id => 'API', :method => 'GET' run lambda { |env| [404, {'Content-Type' => 'text/plain'}, [env.key?('omniauth.auth').to_s]] } }.to_app end def session last_request.env['rack.session'] end it 'should add a camelization for itself' do expect( OmniAuth::Utils.camelize('polaris') ).to eq('Polaris') end describe '/auth/polaris' do before(:each){ get '/auth/polaris' } it 'should display a form' do expect(last_response.status).to eql(200) expect(last_response.body).to include("