spec/omniauth/strategies/linkedin_spec.rb in omniauth-linkedin-oauth2-0.1.4 vs spec/omniauth/strategies/linkedin_spec.rb in omniauth-linkedin-oauth2-0.1.5
- old
+ new
@@ -62,9 +62,18 @@
end
it { subject.extra['raw_info'].should eq({ :foo => 'bar' }) }
end
+ describe '#access_token' do
+ before :each do
+ subject.stub(:oauth2_access_token) { double('oauth2 access token', :expires_in => 3600, :expires_at => 946688400).as_null_object }
+ end
+
+ it { subject.access_token.expires_in.should eq(3600) }
+ it { subject.access_token.expires_at.should eq(946688400) }
+ end
+
describe '#raw_info' do
before :each do
response = double('response', :parsed => { :foo => 'bar' })
subject.stub(:access_token) { double('access token', :get => response) }
end