Browse Source

testing back link

pull/668/head
JG 3 years ago
parent
commit
c1c894d949
  1. 15
      spec/features/schemes_spec.rb

15
spec/features/schemes_spec.rb

@ -131,6 +131,21 @@ RSpec.describe "Schemes scheme Features" do
expect(page).to have_content(schemes.first.intended_stay_display)
end
context "when I click to go back" do
before do
visit("schemes")
click_link(scheme.service_name)
end
it "shows list of links to schemes" do
click_on("Back")
schemes.each do |scheme|
expect(page).to have_link(scheme.service_name)
expect(page).to have_content(scheme.primary_client_group_display)
end
end
end
context "when there are locations that belong to the selected scheme" do
let!(:schemes) { FactoryBot.create_list(:scheme, 5) }
let(:scheme) { schemes.first }

Loading…
Cancel
Save