|
|
@ -208,7 +208,7 @@ RSpec.describe "Schemes scheme Features" do |
|
|
|
|
|
|
|
|
|
|
|
it "shows details of those locations" do |
|
|
|
it "shows details of those locations" do |
|
|
|
locations.each do |location| |
|
|
|
locations.each do |location| |
|
|
|
expect(page).to have_content(location.location_code) |
|
|
|
expect(page).to have_content(location.id) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
@ -419,7 +419,7 @@ RSpec.describe "Schemes scheme Features" do |
|
|
|
|
|
|
|
|
|
|
|
it "displays information about locations" do |
|
|
|
it "displays information about locations" do |
|
|
|
expect(page).to have_content "Locations" |
|
|
|
expect(page).to have_content "Locations" |
|
|
|
expect(page).to have_content "#{scheme.locations.count} locations" |
|
|
|
expect(page).to have_content "#{scheme.locations.count} location" |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -436,24 +436,6 @@ RSpec.describe "Schemes scheme Features" do |
|
|
|
expect(page).to have_content scheme.stock_owning_organisation.name |
|
|
|
expect(page).to have_content scheme.stock_owning_organisation.name |
|
|
|
expect(page).to have_content "#{scheme.organisation.name} has been created." |
|
|
|
expect(page).to have_content "#{scheme.organisation.name} has been created." |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "when I press the back button" do |
|
|
|
|
|
|
|
before do |
|
|
|
|
|
|
|
click_link "Back" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "lets me select the secondary group" do |
|
|
|
|
|
|
|
expect(page).to have_current_path("/schemes/#{scheme.id}/support") |
|
|
|
|
|
|
|
expect(page).to have_content "What support does this scheme provide?" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context "when we amend support" do |
|
|
|
|
|
|
|
it "returns to the add location page" do |
|
|
|
|
|
|
|
click_button "Save and continue" |
|
|
|
|
|
|
|
expect(page).to have_current_path("/schemes/#{scheme.id}/location/new") |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "when changing answers" do |
|
|
|
context "when changing answers" do |
|
|
|