Sha256: ca5cd3c6f41ac7374488ca6c49dc202f9e94ef5d5f37705a7b35ef60ef4bf232

Contents?: true

Size: 567 Bytes

Versions: 24

Compression:

Stored size: 567 Bytes

Contents

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

describe "Warden::Github" 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('https')
    uri.host.should eql('github.com')

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

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
warden-github-0.12.1 spec/oauth_spec.rb
warden-github-0.12.0 spec/oauth_spec.rb
warden-github-0.11.0 spec/oauth_spec.rb
warden-github-0.10.2 spec/oauth_spec.rb
warden-github-0.10.1 spec/oauth_spec.rb
warden-github-0.10.0 spec/oauth_spec.rb
warden-github-0.9.1 spec/oauth_spec.rb
warden-github-0.9.0 spec/oauth_spec.rb
warden-github-0.8.2 spec/oauth_spec.rb
warden-github-0.8.1 spec/oauth_spec.rb
warden-github-0.8.0 spec/oauth_spec.rb
warden-github-0.7.0 spec/oauth_spec.rb
warden-github-0.6.1 spec/oauth_spec.rb
warden-github-0.6.0 spec/oauth_spec.rb
warden-github-0.5.1 spec/oauth_spec.rb
warden-github-0.5.0 spec/oauth_spec.rb
warden-github-0.4.4 spec/oauth_spec.rb
warden-github-0.4.3 spec/oauth_spec.rb
warden-github-0.4.2 spec/oauth_spec.rb
warden-github-0.4.1 spec/oauth_spec.rb