module

Devise::Test::IntegrationHelpers

Class methods

find_scope(resource : ActiveRecord::Base) : String

Скоп ресурса: underscore имени класса (Devise::Mapping. find_scope! гема; в порту ключ маппинга строится так же в models.cr).

Source
session_key(scope : String) : String
Source

Instance methods

controller

Тест-класс предоставляет контроллер, чья сессия играет роль интеграционной сессии (в геме — request/actiondispatch-сессия).

Source
sign_in(resource : ActiveRecord::Base, scope : String | Nil = nil) : Nil

Sign in a resource: mimics Devise::SessionsController#create (без валидаций/trackable — как login_as гема).

Source
sign_out(resource_or_scope : ActiveRecord::Base | String | Symbol) : Nil

Sign out a resource or scope (logout гема).

Source