diff --git a/app/views/garden_collaborators/index.html.haml b/app/views/garden_collaborators/index.html.haml index fd1d01996..95bab6a68 100644 --- a/app/views/garden_collaborators/index.html.haml +++ b/app/views/garden_collaborators/index.html.haml @@ -4,7 +4,7 @@ - content_for :breadcrumbs do %li.breadcrumb-item= link_to 'Gardens', gardens_path - %li.breadcrumb-item.active= link_to @garden, gardens_path(@garden) + %li.breadcrumb-item.active= link_to @garden, garden_path(@garden) .row .col-md-2 diff --git a/app/views/gardens/show.html.haml b/app/views/gardens/show.html.haml index d860aa5a6..ecc9cc0ca 100644 --- a/app/views/gardens/show.html.haml +++ b/app/views/gardens/show.html.haml @@ -6,7 +6,7 @@ - content_for :breadcrumbs do %li.breadcrumb-item= link_to 'Gardens', gardens_path - %li.breadcrumb-item.active= link_to @garden.name, gardens_path(@garden) + %li.breadcrumb-item.active= link_to @garden.name, garden_path(@garden) .garden-show.record-page .row diff --git a/spec/views/gardens/show.html.haml_spec.rb b/spec/views/gardens/show.html.haml_spec.rb index 058664a8d..a35788d3a 100644 --- a/spec/views/gardens/show.html.haml_spec.rb +++ b/spec/views/gardens/show.html.haml_spec.rb @@ -21,6 +21,10 @@ describe "gardens/show" do expect(rendered).to have_content @garden.location end + it 'links the breadcrumb to the garden itself' do + expect(view.content_for(:breadcrumbs)).to have_link(@garden.name, href: garden_path(@garden)) + end + it 'shows the area' do expect(rendered).to have_content pluralize(@garden.area, @garden.area_unit) end