Sha256: 26006fb24bd7af748339e4038bb71550abd44332f4a6a3590e07ef3ae8488111

Contents?: true

Size: 671 Bytes

Versions: 4

Compression:

Stored size: 671 Bytes

Contents

require File.expand_path('../../../spec_helper', __FILE__)

describe OmniAuth::Strategies::Foursquare do
  it_should_behave_like "an oauth2 strategy"
  subject{ OmniAuth::Strategies::Foursquare.new(lambda{|env|[200,{},[""]]} , 'abc', 'def')}

  it 'should use the mobile authorize url when :mobile is true' do
    subject.authorize_url(:mobile => true).should be_include("/mobile/")
  end

  it 'should use the authorize endpoint if :sign_in is false' do
    subject.authorize_url(:sign_in => false).should be_include("/authorize")
  end

  it 'should default to the authenticate endpoint' do
    subject.client.authorize_url.should be_include('/authenticate')
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
omniauth-0.2.6 oa-oauth/spec/omniauth/strategies/foursquare_spec.rb
oa-oauth-0.2.6 spec/omniauth/strategies/foursquare_spec.rb
omniauth-0.2.5 oa-oauth/spec/omniauth/strategies/foursquare_spec.rb
oa-oauth-0.2.5 spec/omniauth/strategies/foursquare_spec.rb