From 83c8d3f298c7f562850f7e078e93c8bb8cc6e63d Mon Sep 17 00:00:00 2001 From: JG Date: Fri, 8 Jul 2022 10:12:42 +0100 Subject: [PATCH] added test to click to change location --- spec/features/schemes_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index 880e8ceb5..b7c34583b 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -732,6 +732,17 @@ RSpec.describe "Schemes scheme Features" do expect(page).to have_content scheme.locations.first.id expect(page).to have_current_path("/schemes/#{scheme.id}/locations") end + + context "when I click to change location name" do + before do + click_link(scheme.locations.first.postcode) + end + + it "shows available fields to edit" do + expect(page).to have_current_path("/schemes/#{scheme.id}/locations/1/edit-name") + expect(page).to have_content "Location name for #{scheme.locations.first.postcode}" + end + end end end end