Sha256: ff72040000f5dd66146a65f83341aa92b6fa10fe7e534aa3005046915b4d8ea8

Contents?: true

Size: 656 Bytes

Versions: 4

Compression:

Stored size: 656 Bytes

Contents

require 'spec_helper'
require 'support/features/feature_helpers'

feature 'visitor signs out' do
  before do
    @user = create(:user)
  end

  scenario 'sign in and sign out' do
    sign_in_with(@user.email, @user.password)
    sign_out
    expect_user_to_be_signed_out
  end

  scenario 'sign out again' do
    sign_in_with(@user.email, @user.password)
    visit sign_out_path
    visit sign_out_path
    expect_user_to_be_signed_out
  end

  scenario 'redirects to sign in' do
    sign_in_with(@user.email, @user.password)
    visit sign_out_path
    expect_sign_in_path
  end
end


def expect_sign_in_path
  expect(current_path).to eq sign_in_path
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
authenticate-0.7.1 spec/features/sign_out_spec.rb
authenticate-0.7.0 spec/features/sign_out_spec.rb
authenticate-0.6.1 spec/features/sign_out_spec.rb
authenticate-0.6.0 spec/features/sign_out_spec.rb