Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
402 B

module ControllerMacros
# def login_admin
# before(:each) do
# @request.env["devise.mapping"] = Devise.mappings[:admin]
# sign_in FactoryBot.create(:admin) # Using factory bot as an example
# end
# end
def login_user
before(:each) do
@request.env["devise.mapping"] = Devise.mappings[:user]
user = FactoryBot.create(:user)
sign_in user
end
end
end