Browse Source

Add details path to schemes controller update method

pull/671/head
Kat 3 years ago committed by JG
parent
commit
232b97b2eb
  1. 2
      app/controllers/schemes_controller.rb
  2. 7
      spec/features/schemes_spec.rb

2
app/controllers/schemes_controller.rb

@ -55,6 +55,8 @@ class SchemesController < ApplicationController
scheme_support_path(@scheme) scheme_support_path(@scheme)
when "support" when "support"
scheme_check_answers_path(@scheme) scheme_check_answers_path(@scheme)
when "details"
scheme_primary_client_group_path(@scheme)
end end
redirect_to schemes_path redirect_to schemes_path

7
spec/features/schemes_spec.rb

@ -277,6 +277,13 @@ RSpec.describe "Schemes scheme Features" do
expect(page).to have_content "Is this scheme registered under the Care Standards Act 2000?" expect(page).to have_content "Is this scheme registered under the Care Standards Act 2000?"
expect(page).to have_content "Total number of units" expect(page).to have_content "Total number of units"
end end
context "when we amend scheme details" do
it "returns to the primary client group question" do
click_button "Save and continue"
expect(page).to have_content "What client group is this scheme intended for?"
end
end
end end
context "when I select primary client group details" do context "when I select primary client group details" do

Loading…
Cancel
Save