Sha256: bd059a9bcfcfc2fc9ba50842fd8af8560e13a1333fe22505746b705eefe21c37
Contents?: true
Size: 750 Bytes
Versions: 42
Compression:
Stored size: 750 Bytes
Contents
require 'spec_helper' describe Clearance::Constraints::SignedOut do it 'returns true when user is signed out' do constraint = Clearance::Constraints::SignedOut.new request = request_without_remember_token expect(constraint.matches?(request)).to eq true end it 'returns false when user is not signed out' do user = create(:user) constraint = Clearance::Constraints::SignedOut.new request = request_with_remember_token(user.remember_token) expect(constraint.matches?(request)).to eq false end it 'returns true when clearance info is missing from request' do constraint = Clearance::Constraints::SignedOut.new request = Rack::Request.new({}) expect(constraint.matches?(request)).to eq true end end
Version data entries
42 entries across 42 versions & 1 rubygems