Browse Source

added test to amend a location

pull/704/head
JG 3 years ago
parent
commit
15a90ac406
  1. 38
      spec/features/schemes_spec.rb

38
spec/features/schemes_spec.rb

@ -460,21 +460,18 @@ RSpec.describe "Schemes scheme Features" do
expect(page).to have_content "Other name"
expect(page).to have_content "Self-contained house"
end
end
end
context "and I select to create a scheme" do
before do
click_link "Create scheme"
end
context "changing location details" do
before do
click_link "XX11XX"
fill_in "Postcode", with: "ZZ1 1ZZ"
click_button "Save and continue"
end
it "adds scheme to the list of schemes" do
expect(page).to have_content "Supported housing schemes"
expect(page).to have_content scheme.id_to_display
expect(page).to have_content scheme.service_name
expect(page).to have_content scheme.organisation.name
expect(page).to have_content scheme.stock_owning_organisation.name
expect(page).to have_content "#{scheme.organisation.name} has been created."
it "displays changed location" do
expect(page).to have_content "ZZ11ZZ"
end
end
end
end
@ -643,6 +640,21 @@ RSpec.describe "Schemes scheme Features" do
end
end
end
context "and I select to create a scheme" do
before do
click_link "Create scheme"
end
it "adds scheme to the list of schemes" do
expect(page).to have_content "Supported housing schemes"
expect(page).to have_content scheme.id_to_display
expect(page).to have_content scheme.service_name
expect(page).to have_content scheme.organisation.name
expect(page).to have_content scheme.stock_owning_organisation.name
expect(page).to have_content "#{scheme.organisation.name} has been created."
end
end
end
end
end

Loading…
Cancel
Save