Sha256: 86c742bd8e22b6d69729f1efc6861fd3e8c5adc73a02a0a24b5d6f480c3f2fbb

Contents?: true

Size: 664 Bytes

Versions: 2

Compression:

Stored size: 664 Bytes

Contents

require 'spec_helper'

feature 'visitor has consecutive bad logins' do
  before(:each) do
    @user = create(:user)
  end

  scenario 'visitor logs in and subsequent click within lifetime' do
    sign_in_with @user.email, @user.password
    expect_user_to_be_signed_in

    Timecop.travel 1.minutes do
      visit root_path
      expect_user_to_be_signed_in
    end
  end

  scenario 'visitor logs in and lets session live too long' do
    sign_in_with @user.email, @user.password
    expect_user_to_be_signed_in

    Timecop.travel 2.days do
      visit root_path
      expect(current_path).to eq sign_in_path
      expect_user_to_be_signed_out
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
authenticate-0.7.3 spec/features/max_session_lifetime_spec.rb
authenticate-0.7.2 spec/features/max_session_lifetime_spec.rb