Sha256: 0d40e21bca0227891547b7988fd2fbfa9f4ec5d7ae1147e03acb8e2fe995f636

Contents?: true

Size: 532 Bytes

Versions: 16

Compression:

Stored size: 532 Bytes

Contents

require 'spec_helper'

describe Clearance::Constraints::SignedOut do
  it 'returns true when user is signed out' do
    signed_out_constraint = Clearance::Constraints::SignedOut.new
    signed_out_constraint.matches?(request_without_remember_token).should be_true
  end

  it 'returns false when user is not signed out' do
    user = create(:user)
    signed_out_constraint = Clearance::Constraints::SignedOut.new
    signed_out_constraint.matches?(request_with_remember_token(user.remember_token)).
      should be_false
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
clearance-1.4.2 spec/clearance/constraints/signed_out_spec.rb
clearance-1.4.1 spec/clearance/constraints/signed_out_spec.rb
clearance-1.4.0 spec/clearance/constraints/signed_out_spec.rb
clearance-1.3.0 spec/clearance/constraints/signed_out_spec.rb
clearance-1.2.1 spec/clearance/constraints/signed_out_spec.rb
clearance-1.2.0 spec/clearance/constraints/signed_out_spec.rb
clearance-1.1.0 spec/clearance/constraints/signed_out_spec.rb
clearance-1.0.1 spec/clearance/constraints/signed_out_spec.rb
clearance-1.0.0 spec/clearance/constraints/signed_out_spec.rb
clearance-1.0.0.rc8 spec/clearance/constraints/signed_out_spec.rb
clearance-1.0.0.rc7 spec/clearance/constraints/signed_out_spec.rb
clearance-1.0.0.rc6 spec/clearance/constraints/signed_out_spec.rb
clearance-1.0.0.rc4 spec/clearance/constraints/signed_out_spec.rb
clearance-1.0.0.rc3 spec/clearance/constraints/signed_out_spec.rb
clearance-1.0.0.rc2 spec/clearance/constraints/signed_out_spec.rb
clearance-1.0.0.rc1 spec/clearance/constraints/signed_out_spec.rb