Module: AuthenticationHelpers
- Defined in:
- lib/generators/authentication/templates/spec/support/authentication_helpers.rb
Instance Method Summary collapse
Instance Method Details
#sign_in(record, **options) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/generators/authentication/templates/spec/support/authentication_helpers.rb', line 8 def sign_in(record, **) 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 "Sign in" end |