Nested routes and database changes that are required
Basic home screen Model and controller tests coming along
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user