opensmtpd_rails_frontend/test/controllers/home_controller_test.rb
Jez Caudle b76375d086 Nested routes and database changes that are required
Basic home screen
Model and controller tests coming along
2023-06-21 07:08:25 +01:00

17 lines
418 B
Ruby

require "test_helper"
class HomeControllerTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
test "when not logged in you will be redirected to the login page" do
get root_path
assert_redirected_to new_user_session_path
end
test "when logged in you will be redirected to the home page" do
sign_in users(:bob)
get root_path
assert_response :success
end
end