Sha256: 12bde6a8ba07891e7b660b53745066cd4b0aabf895d81c812b5470d8edb06e0d

Contents?: true

Size: 542 Bytes

Versions: 4

Compression:

Stored size: 542 Bytes

Contents

class ActiveSupport::IntegrationCase < ActionDispatch::IntegrationTest
  include Capybara::DSL
  include Rails.application.routes.url_helpers
  include Warden::Test::Helpers

  def setup
    logout(:user)
  end

  def sign_in_user(user = nil, options = {})
    user = users(:john) unless user.present?

    visit new_user_session_path

    assert_equal current_path, '/users/sign_in'

    fill_in 'user_email', with: user.email
    fill_in 'user_password', with: options[:password] || '12345678'

    click_button 'Log in'
    user
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
devise-verifiable-1.0.0 test/support/integration_case.rb
devise-verifiable-0.0.3 test/support/integration_case.rb
devise-verifiable-0.0.2 test/support/integration_case.rb
devise-verifiable-0.0.1 test/support/integration_case.rb