Browse Source

test: update locations list test in locations_controller_spec.rb

pull/987/head
Sam Seed 4 years ago
parent
commit
601b269d2e
  1. 14
      spec/requests/locations_controller_spec.rb

14
spec/requests/locations_controller_spec.rb

@ -867,14 +867,12 @@ RSpec.describe LocationsController, type: :request do
end end
end end
it "shows scheme" do it "shows locations with correct data" do
locations.each do |location| locations.each do |location|
expect(page).to have_content(location.id) expect(page).to have_content(location.id)
expect(page).to have_content(location.postcode) expect(page).to have_content(location.postcode)
expect(page).to have_content(location.type_of_unit) expect(page).to have_content(location.name)
expect(page).to have_content(location.mobility_type) expect(page).to have_content(location.status)
expect(page).to have_content(location.location_admin_district)
expect(page).to have_content(location.startdate.to_formatted_s(:govuk_date))
end end
end end
@ -972,12 +970,12 @@ RSpec.describe LocationsController, type: :request do
get "/schemes/#{scheme.id}/locations" get "/schemes/#{scheme.id}/locations"
end end
it "shows scheme" do it "shows locations with correct data" do
locations.each do |location| locations.each do |location|
expect(page).to have_content(location.id) expect(page).to have_content(location.id)
expect(page).to have_content(location.postcode) expect(page).to have_content(location.postcode)
expect(page).to have_content(location.type_of_unit) expect(page).to have_content(location.name)
expect(page).to have_content(location.startdate.to_formatted_s(:govuk_date)) expect(page).to have_content(location.status)
end end
end end

Loading…
Cancel
Save