Sha256: 8779a3412b1b41ff1d4212a1affbbbc37ea81b127ec23056c7b2a9c0ff691f02
Contents?: true
Size: 631 Bytes
Versions: 15
Compression:
Stored size: 631 Bytes
Contents
# -*- encoding : utf-8 -*- describe Card::Set::Right::Token do before do @token = Card['Anonymous+*account'].fetch trait: :token, new: {} end it 'should get expiration from configuration by default' do expect(@token.term).to eq(Card.config.token_expiry) end it 'should get expiration from card if it exists' do @token.expiration = '3 days' expect(@token.term).to eq(3.days) expect(@token.permanent?).to be false end it 'should be permanent if expiration is "none"' do @token.expiration = 'none' expect(@token.term).to eq('permanent') expect(@token.permanent?).to be true end end
Version data entries
15 entries across 15 versions & 1 rubygems