Sha256: 8014001fb455495b669c283dab54fb4e973f5c5285d14048968e874f805d42fc

Contents?: true

Size: 573 Bytes

Versions: 1

Compression:

Stored size: 573 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe 'Warden::Oauthed' do
  it 'requesting an url that requires authentication redirects to github' do
    response = get '/'

    uri = Addressable::URI.parse(response.headers['Location'])

    uri.scheme.should eql('http')
    uri.host.should eql('localhost')

    params = uri.query_values
    params['response_type'].should eql('code')
    params['scope'].should eql('public')
    params['client_id'].should match(/\w{20}/)
    params['redirect_uri'].should eql('http://example.org/auth/oauthed/callback')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
warden-oauthed-0.0.1 spec/oauth_spec.rb