Sha256: 7dbefb69c500d8f5f1cc02ff29dc7fbb2963b8a8f6589c65b492cea7fc126d20
Contents?: true
Size: 631 Bytes
Versions: 7
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
7 entries across 7 versions & 1 rubygems