module AuthenticationHelpers

Helpers for automating sign-in and out during tests Automatically generated by the orthodox gem (github.com/katanacode/orthodox) © Copyright 2019 Katana Code Ltd. All Rights Reserved.

Public Instance Methods

sign_in(record, **options) click to toggle source
# File lib/generators/authentication/templates/spec/support/authentication_helpers.rb, line 8
def sign_in(record, **options)
  type = record.class.model_name.singular
  visit(public_send("new_#{type.pluralize}_session_path"))
  fill_in :"#{type}_session_email", with: record.email
  fill_in :"#{type}_session_password", with: record.password
  click_button "Sign in"
end