Browse Source

Add "Add location" button

pull/756/head
baarkerlounger 3 years ago
parent
commit
7e55c2a57f
  1. 1
      app/views/locations/index.html.erb
  2. 10
      spec/features/schemes_spec.rb

1
app/views/locations/index.html.erb

@ -52,5 +52,6 @@
<% end %>
<% end %>
<% end %>
<%= govuk_button_link_to "Add a location", new_location_path(id: @scheme.id), secondary: true %>
<%== render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "locations" } %>

10
spec/features/schemes_spec.rb

@ -243,6 +243,16 @@ RSpec.describe "Schemes scheme Features" do
end
end
context "when the user clicks add location" do
before do
click_link("Locations")
click_link("Add a location")
end
it "shows the new location form" do
expect(page).to have_content("Add a location to this scheme")
end
end
end
end
end

Loading…
Cancel
Save