Sha256: a3d3efc09e87cffcf6aac4c081e8f2fc7f4aef75e8bf6337c462414566776806

Contents?: true

Size: 898 Bytes

Versions: 4

Compression:

Stored size: 898 Bytes

Contents

require 'spec_helper'

describe OmniAuth::Strategies::Mediawiki do
  subject do
    OmniAuth::Strategies::Mediawiki.new({})
  end

  context 'client options' do
    it 'should have correct name' do
      expect(subject.options.name).to eq('mediawiki')
    end

    it 'should have correct site' do
      expect(subject.options.client_options.site).to eq('https://www.mediawiki.org')
    end

    it 'should have correct authorize url' do
      expect(subject.options.client_options.authorize_path).to eq('/wiki/Special:Oauth/authorize')
    end

    it 'should have correct access token url' do
      expect(subject.options.client_options.access_token_path).to eq('/w/index.php?title=Special:OAuth/token')
    end

    it 'should have correct request token url' do
      expect(subject.options.client_options.request_token_path).to eq('/w/index.php?title=Special:OAuth/initiate')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
omniauth-mediawiki-0.0.4 spec/omniauth/strategies/mediawiki_spec.rb
omniauth-mediawiki-0.0.3 spec/omniauth/strategies/mediawiki_spec.rb
omniauth-mediawiki-0.0.2 spec/omniauth/strategies/mediawiki_spec.rb
omniauth-mediawiki-0.0.1 spec/omniauth/strategies/mediawiki_spec.rb