10 lines
199 B
Ruby
10 lines
199 B
Ruby
|
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
|