TokiTranslate/spec/support/controller_macros.rb

10 lines
199 B
Ruby
Raw Permalink Normal View History

2023-10-13 23:42:17 +00:00
module ControllerMacros
def login_user
before(:each) do
@request.env["devise.mapping"] = Devise.mappings[:user]
user = FactoryBot.create(:user)
sign_in user
end
end
end