Sha256: 5389293fa355def8f44a2ef477026ed1276d7e00b32adfef82cb4faec9bfdfa0

Contents?: true

Size: 739 Bytes

Versions: 1

Compression:

Stored size: 739 Bytes

Contents

require 'spec_helper'
require 'omniauth-freeagent'

describe OmniAuth::Strategies::FreeAgent do
  subject do
    OmniAuth::Strategies::FreeAgent.new(nil, @options || {})
  end

  describe '#client' do
    it 'should have the correct site' do
      subject.client.site.should == 'https://api.freeagent.com'
    end

    it 'should have the correct auth URL' do
      subject.client.options[:authorize_url].should == '/v2/approve_app'
    end

    it 'should have the correct token URL' do
      subject.client.options[:token_url].should == '/v2/token_endpoint'
    end
  end

  describe '#callback_path' do
    it 'should have the correct callback path' do
      subject.callback_path.should == '/auth/freeagent/callback'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omniauth-freeagent-0.0.1 spec/omniauth/strategies/freeagent_spec.rb