Sha256: e2cbc86fd076786c680b7ae12caa534190bd6cf5f0d40774f73a8ad6bf9234e6

Contents?: true

Size: 232 Bytes

Versions: 39

Compression:

Stored size: 232 Bytes

Contents

require 'spec_helper'

describe Clearance::Token do
  it 'is a random hex string' do
    token = 'my_token'
    allow(SecureRandom).to receive(:hex).with(20).and_return(token)

    expect(Clearance::Token.new).to eq token
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
clearance-2.9.2 spec/clearance/token_spec.rb
clearance-2.9.1 spec/clearance/token_spec.rb
clearance-2.9.0 spec/clearance/token_spec.rb
clearance-2.8.0 spec/clearance/token_spec.rb
clearance-2.7.2 spec/clearance/token_spec.rb
clearance-2.7.0 spec/clearance/token_spec.rb
clearance-2.6.2 spec/clearance/token_spec.rb
clearance-2.6.1 spec/clearance/token_spec.rb
clearance-2.6.0 spec/clearance/token_spec.rb
clearance-2.5.0 spec/clearance/token_spec.rb
clearance-2.4.0 spec/clearance/token_spec.rb
clearance-2.3.1 spec/clearance/token_spec.rb
clearance-2.3.0 spec/clearance/token_spec.rb
clearance-2.2.1 spec/clearance/token_spec.rb
clearance-2.2.0 spec/clearance/token_spec.rb
clearance-2.1.0 spec/clearance/token_spec.rb
clearance-2.0.0 spec/clearance/token_spec.rb
clearance-2.0.0.beta2 spec/clearance/token_spec.rb
clearance-2.0.0.beta1 spec/clearance/token_spec.rb
clearance-1.17.0 spec/clearance/token_spec.rb