Skip to content

Commit

Permalink
satisfy boat management route specs
Browse files Browse the repository at this point in the history
  • Loading branch information
christinalcole committed Nov 9, 2017
1 parent ee491ed commit 7ebe946
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 2 deletions.
7 changes: 7 additions & 0 deletions app/controllers/boats_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class BoatsController < ApplicationController
def index
end

def show
end
end
14 changes: 14 additions & 0 deletions app/controllers/users/boats_controller.rb
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions app/views/boats/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
boats#show
1 change: 1 addition & 0 deletions app/views/users/boats/edit.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
user::boats#edit
1 change: 1 addition & 0 deletions app/views/users/boats/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
user::boats#new
1 change: 1 addition & 0 deletions app/views/users/boats/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
users::boats#show
4 changes: 4 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 6 additions & 2 deletions spec/features/boats/boat_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7ebe946

Please sign in to comment.