Browse Source

asking for locations in the link

pull/662/head
JG 3 years ago
parent
commit
a78a27ad4c
  1. 5
      app/views/schemes/show.html.erb
  2. 2
      spec/features/schemes_spec.rb

5
app/views/schemes/show.html.erb

@ -3,8 +3,9 @@
<%= render partial: "organisations/headings", locals: { main: @scheme.service_name, sub: nil } %> <%= render partial: "organisations/headings", locals: { main: @scheme.service_name, sub: nil } %>
<%= render SubNavigationComponent.new( <%= render SubNavigationComponent.new(
items: scheme_items(request.path, @scheme.id), items: scheme_items(request.path, @scheme.id, @scheme.locations.count),
) %> ) %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">
@ -19,3 +20,5 @@
<% end %> <% end %>
</div> </div>
</div> </div>
<%= govuk_back_link(href: "#{request.referrer}")%>

2
spec/features/schemes_spec.rb

@ -130,7 +130,7 @@ RSpec.describe "Supported housing scheme Features" do
end end
it "shows service and locations tab" do it "shows service and locations tab" do
expect(page).to have_link("Service") expect(page).to have_link("Scheme")
expect(page).to have_link("#{schemes.count} locations") expect(page).to have_link("#{schemes.count} locations")
end end
end end

Loading…
Cancel
Save