Commit 35127bc
Changed files (2)
config
spec
routing
config/routes.rb
@@ -1,9 +1,8 @@
Rails.application.routes.draw do
-
root 'sessions#new'
resources :sessions, only: [:new, :create, :destroy]
resources :registrations, only: [:new, :create]
resources :items
- get '/' => 'sessions#new', as: :dashboard
+ get '/dashboard' => 'items#index', as: :dashboard
get "/terms" => "static_pages#terms"
end
spec/routing/dashboard_routing_spec.rb
@@ -0,0 +1,7 @@
+require "rails_helper"
+
+RSpec.describe "/dashboard", type: :routing do
+ it "routes to the items listing" do
+ expect(get: "/dashboard").to route_to("items#index")
+ end
+end