Sha256: fcc0d5fa9d14ae0d3339553481230445628796ff41f1599f76773dc9dc5413b4

Contents?: true

Size: 634 Bytes

Versions: 3

Compression:

Stored size: 634 Bytes

Contents

require 'spec_helper'

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

3 entries across 3 versions & 1 rubygems

Version Path
oa-oauth-0.3.2 spec/omniauth/strategies/oauth2/foursquare_spec.rb
oa-oauth-0.3.0 spec/omniauth/strategies/oauth2/foursquare_spec.rb
oa-oauth-0.3.0.rc3 spec/omniauth/strategies/oauth2/foursquare_spec.rb