Skip to content

Allow logging in with devise #80

@grantspeelman

Description

@grantspeelman

Make Authenticating a User https://github.com/shakacode/cypress-on-rails/blob/master/docs/authentication.md part of the gem.

Using Rails engines we can make the following work out of the box.

  // after logging in we redirect the user
  cy.forceLogin({email: '[email protected]', redirect_to: '/home'})

  // If a different model is used instead of `User`
  cy.forceLogin({email: '[email protected]', model: 'Account'})

  // logging in by id
  cy.forceLogin({id: 1})
  • If the login fails we should display a readable error message
  • If devise is not being used we should display a readable error message

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions