Sha256: 5d2642253c827dd0536dde8e0c2f9f642f1b8b4121bacafcac583703bb1a7020

Contents?: true

Size: 850 Bytes

Versions: 10

Compression:

Stored size: 850 Bytes

Contents

require 'spec_helper'

describe OmniAuth::Strategies::Paymium do
  subject do
    strategy = OmniAuth::Strategies::Paymium.new(nil, @options || {})
    strategy.stub(:session) { {  } }
    strategy
  end

  describe '#client' do
    it 'should have the correct Paymium site' do
      expect(subject.client.site).to eq("https://www.paymium.com/")
    end

    it 'should have the correct authorization url' do
      expect(subject.client.options[:authorize_url]).to eq("https://www.paymium.com/api/oauth/authorize")
    end

    it 'should have the correct token url' do
      expect(subject.client.options[:token_url]).to eq('https://www.paymium.com/api/oauth/token')
    end
  end

  describe '#callback_path' do
    it 'should have the correct callback path' do
      expect(subject.callback_path).to eq('/auth/paymium/callback')
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
omniauth-paymium-1.0.10 spec/omniauth/strategies/paymium_spec.rb
omniauth-paymium-1.0.9 spec/omniauth/strategies/paymium_spec.rb
omniauth-paymium-1.0.8 spec/omniauth/strategies/paymium_spec.rb
omniauth-paymium-1.0.7 spec/omniauth/strategies/paymium_spec.rb
omniauth-paymium-1.0.6 spec/omniauth/strategies/paymium_spec.rb
omniauth-paymium-1.0.5 spec/omniauth/strategies/paymium_spec.rb
omniauth-paymium-1.0.4 spec/omniauth/strategies/paymium_spec.rb
omniauth-paymium-1.0.3 spec/omniauth/strategies/paymium_spec.rb
omniauth-paymium-1.0.2 spec/omniauth/strategies/paymium_spec.rb
omniauth-paymium-1.0.1 spec/omniauth/strategies/paymium_spec.rb