Sha256: d932494fe4367fe6b24c1d62d30f2b08ed28f82bdbefc25199760a36814972e6

Contents?: true

Size: 773 Bytes

Versions: 10

Compression:

Stored size: 773 Bytes

Contents

describe EventMachine::Middleware::OAuth2 do
  it "should add an access token to a URI with no query parameters" do
    middleware = EventMachine::Middleware::OAuth2.new(:access_token => "fedcba9876543210")
    uri = Addressable::URI.parse("https://graph.facebook.com/me")
    middleware.update_uri! uri
    uri.to_s.should == "https://graph.facebook.com/me?access_token=fedcba9876543210"
  end

  it "should add an access token to a URI with query parameters" do
    middleware = EventMachine::Middleware::OAuth2.new(:access_token => "fedcba9876543210")
    uri = Addressable::URI.parse("https://graph.facebook.com/me?fields=photo")
    middleware.update_uri! uri
    uri.to_s.should == "https://graph.facebook.com/me?fields=photo&access_token=fedcba9876543210"
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
em-http-request-samesite-0.1.1 spec/middleware/oauth2_spec.rb
em-http-request-samesite-1.1.7 spec/middleware/oauth2_spec.rb
em-http-request-1.1.7 spec/middleware/oauth2_spec.rb
em-http-request-1.1.6 spec/middleware/oauth2_spec.rb
em-http-request-1.1.5 spec/middleware/oauth2_spec.rb
em-http-request-1.1.4 spec/middleware/oauth2_spec.rb
em-http-request-1.1.3 spec/middleware/oauth2_spec.rb
em-http-request-1.1.2 spec/middleware/oauth2_spec.rb
em-http-request-1.1.1 spec/middleware/oauth2_spec.rb
em-http-request-1.1.0 spec/middleware/oauth2_spec.rb