Sha256: 0b54abf4a6fbdfe121af231048c3efca8330d5be19741a2c96e47b6ed911f4e3
Contents?: true
Size: 1.33 KB
Versions: 2
Compression:
Stored size: 1.33 KB
Contents
require 'spec_helper' describe OmniAuth::Strategies::Kosynierzy do let(:request) { double('Request', params: {}, cookies: {}, env: {}) } subject do args = ['appid', 'secret', @options || {}].compact OmniAuth::Strategies::Kosynierzy.new(*args).tap do |strategy| strategy.stub(:request) { request } end end describe 'client options' do describe 'name' do it { expect(subject.options.name).to eq(:kosynierzy) } end describe 'site' do it { expect(subject.options.client_options.site).to eq('https://account.kosynierzy.info') } end describe 'authorize_url' do it { expect(subject.options.client_options.authorize_url).to eq('/oauth/authorize') } end end describe '#info' do before(:each) do subject.stub(:raw_info) { {} } end it { expect(subject.info).to have_key(:email) } it { expect(subject.info).to have_key(:username) } it { expect(subject.info).to have_key(:roles) } it { expect(subject.info).to have_key(:firstname) } it { expect(subject.info).to have_key(:lastname) } it { expect(subject.info).to have_key(:personal_identity_number) } it { expect(subject.info).to have_key(:identity_card_number) } it { expect(subject.info).to have_key(:phone_number) } it { expect(subject.info).to have_key(:address) } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
omniauth-kosynierzy-0.1.1 | spec/omniauth/strategies/kosynierzy_spec.rb |
omniauth-kosynierzy-0.1.0 | spec/omniauth/strategies/kosynierzy_spec.rb |