490da89281b7ee019c87406fb8ce7359aff0932cEugen Kuksarequire 'spec_helper'
68ff70f830e958de6693000b9652c9aa8cff97e7Eugen Kuksa repository.save
9dd500e3acdc343dbefcaf88b7663db25be0ef46Eugen Kuksa context 'expired?' do
9dd500e3acdc343dbefcaf88b7663db25be0ef46Eugen Kuksa it 'should not be expired when the expiration date is in the future' do
9dd500e3acdc343dbefcaf88b7663db25be0ef46Eugen Kuksa expect(access_token.expired?).to be_falsy
9dd500e3acdc343dbefcaf88b7663db25be0ef46Eugen Kuksa it 'should be expired when the expiration date is in the past' do
9dd500e3acdc343dbefcaf88b7663db25be0ef46Eugen Kuksa access_token.expiration = (-1).minutes.from_now
9dd500e3acdc343dbefcaf88b7663db25be0ef46Eugen Kuksa expect(access_token.expired?).to be_truthy