diff --git a/app/controllers/boats_controller.rb b/app/controllers/boats_controller.rb new file mode 100644 index 0000000..e990aa2 --- /dev/null +++ b/app/controllers/boats_controller.rb @@ -0,0 +1,7 @@ +class BoatsController < ApplicationController + def index + end + + def show + end +end diff --git a/app/controllers/users/boats_controller.rb b/app/controllers/users/boats_controller.rb new file mode 100644 index 0000000..e02d07e --- /dev/null +++ b/app/controllers/users/boats_controller.rb @@ -0,0 +1,14 @@ +class Users::BoatsController < ApplicationController + # before_action :authenticate_user! + def index + end + + def new + end + + def show + end + + def edit + end +end diff --git a/app/views/boats/show.html.erb b/app/views/boats/show.html.erb new file mode 100644 index 0000000..25810d8 --- /dev/null +++ b/app/views/boats/show.html.erb @@ -0,0 +1 @@ +boats#show diff --git a/app/views/users/boats/edit.html.erb b/app/views/users/boats/edit.html.erb new file mode 100644 index 0000000..d91a848 --- /dev/null +++ b/app/views/users/boats/edit.html.erb @@ -0,0 +1 @@ +user::boats#edit diff --git a/app/views/users/boats/new.html.erb b/app/views/users/boats/new.html.erb new file mode 100644 index 0000000..15d1ec9 --- /dev/null +++ b/app/views/users/boats/new.html.erb @@ -0,0 +1 @@ +user::boats#new diff --git a/app/views/users/boats/show.html.erb b/app/views/users/boats/show.html.erb new file mode 100644 index 0000000..68b5012 --- /dev/null +++ b/app/views/users/boats/show.html.erb @@ -0,0 +1 @@ +users::boats#show diff --git a/config/routes.rb b/config/routes.rb index 0886641..a13c280 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,8 +7,12 @@ resources :users do scope module: :users do resources :positions, only: [:index] + resources :boats end end resources :positions, except: [:show] + + resources :boats, only: [:index, :show] + end diff --git a/spec/features/boats/boat_management_spec.rb b/spec/features/boats/boat_management_spec.rb index 708dc04..6a8eaa5 100644 --- a/spec/features/boats/boat_management_spec.rb +++ b/spec/features/boats/boat_management_spec.rb @@ -38,8 +38,12 @@ expect(page.status_code).to eq(200) end - scenario 'an index page of all boats in the db exists' - scenario 'a page to add a new boat that is not nested under the current user does not exist' + scenario 'an index page of all boats in the db exists' do + visit boats_path + + expect(page.status_code).to eq(200) + end + scenario 'a page to add a new boat that is not nested under the current user does not exist' scenario 'a page to edit a specific boat that is not nested under the current user does not exist' end