Sha256: 0748cdd79a09366d787f2e68c0ba11b67802da434914e5bb58a235cf502b79b6
Contents?: true
Size: 501 Bytes
Versions: 8
Compression:
Stored size: 501 Bytes
Contents
require 'spec_helper' require 'authenticate/model/timeoutable' describe Authenticate::Model::Timeoutable do subject { create(:user) } it 'does not timeout while last_access_at is valid' do Timecop.freeze do subject.last_access_at = 1.minutes.ago expect(subject.timedout?).to be_falsey end end it 'does timeout when last_access_at is stale' do Timecop.freeze do subject.last_access_at = 1.days.ago expect(subject.timedout?).to be_truthy end end end
Version data entries
8 entries across 8 versions & 1 rubygems