summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/home_controller.rb4
-rw-r--r--app/views/home/index.html.erb2
-rw-r--r--config/routes.rb4
-rw-r--r--test/controllers/home_controller_test.rb8
4 files changed, 15 insertions, 3 deletions
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb
new file mode 100644
index 0000000..95f2992
--- /dev/null
+++ b/app/controllers/home_controller.rb
@@ -0,0 +1,4 @@
+class HomeController < ApplicationController
+ def index
+ end
+end
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
new file mode 100644
index 0000000..2085730
--- /dev/null
+++ b/app/views/home/index.html.erb
@@ -0,0 +1,2 @@
+<h1>Home#index</h1>
+<p>Find me in app/views/home/index.html.erb</p>
diff --git a/config/routes.rb b/config/routes.rb
index a125ef0..06d8529 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,10 +1,8 @@
Rails.application.routes.draw do
- # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
-
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
# Can be used by load balancers and uptime monitors to verify that the app is live.
get "up" => "rails/health#show", as: :rails_health_check
# Defines the root path route ("/")
- # root "posts#index"
+ root "home#index"
end
diff --git a/test/controllers/home_controller_test.rb b/test/controllers/home_controller_test.rb
new file mode 100644
index 0000000..6bd87f6
--- /dev/null
+++ b/test/controllers/home_controller_test.rb
@@ -0,0 +1,8 @@
+require "test_helper"
+
+class HomeControllerTest < ActionDispatch::IntegrationTest
+ test "gets index" do
+ get home_index_url
+ assert_response :success
+ end
+end