Commit 35127bc

mo khan <mo@mokhan.ca>
2015-02-28 23:55:38
change dashboard route to go to items index.
1 parent 7ddbc69
Changed files (2)
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