Module: Passwordless::TestHelpers::SystemTestCase
- Defined in:
- lib/passwordless/test_helpers.rb
Instance Method Summary collapse
Instance Method Details
#passwordless_sign_in(resource) ⇒ Object
21 22 23 24 |
# File 'lib/passwordless/test_helpers.rb', line 21 def passwordless_sign_in(resource) session = Passwordless::Session.create!(authenticatable: resource, user_agent: "TestAgent", remote_addr: "unknown") visit Passwordless::Engine.routes.url_helpers.token_sign_in_path(session.token) end |
#passwordless_sign_out ⇒ Object
17 18 19 |
# File 'lib/passwordless/test_helpers.rb', line 17 def passwordless_sign_out visit Passwordless::Engine.routes.url_helpers.sign_out_path end |