Nested routes and database changes that are required

Basic home screen
Model and controller tests coming along
This commit is contained in:
2023-06-21 07:08:25 +01:00
parent bfd5d8533e
commit b76375d086
9 changed files with 85 additions and 14 deletions

View File

@@ -1,7 +1,16 @@
require "test_helper"
class HomeControllerTest < ActionDispatch::IntegrationTest
# test "the truth" do
# assert true
# end
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