Sha256: 4f53bd78abb665ed4403b28b986063fc49b612b327b91e9f7453df2c794793fd
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' require 'omniauth-fitcvut-oauth2' describe OmniAuth::Strategies::FITCVUTOauth2 do let(:request) do double('request', :params => {}, :cookies => {}, :env => {}) end subject do OmniAuth::Strategies::FITCVUTOauth2.new(nil, @options || {}).tap do |strategy| strategy.stub(:request => request) end end it_should_behave_like 'an oauth2 strategy' describe '#client' do it 'should have the correct FITCVUTOauth2 site' do expect(subject.client.site).to eq('https://auth.fit.cvut.cz') end it 'should have the correct authorization url' do expect(subject.client.options[:authorize_url]).to eq('/oauth/oauth/authorize') end it 'should have the correct token url' do expect(subject.client.options[:token_url]).to eq('/oauth/oauth/token') end end describe '#callback_path' do it 'should have the correct callback path' do expect(subject.callback_path).to eq('/auth/fitcvut_oauth2/callback') end end end
Version data entries
3 entries across 3 versions & 1 rubygems