Browse Source

use 2022/23c fixture for in the test

pull/615/head
Kat 3 years ago
parent
commit
9d9459bac1
  1. 7
      spec/fixtures/forms/2022_2023.json
  2. 8
      spec/requests/form_controller_spec.rb

7
spec/fixtures/forms/2022_2023.json vendored

@ -118,7 +118,12 @@
"derived": true, "derived": true,
"depends_on": [false] "depends_on": [false]
} }
} },
"depends_on": [
{
"setup": "completed"
}
]
} }
} }
} }

8
spec/requests/form_controller_spec.rb

@ -37,10 +37,10 @@ RSpec.describe FormController, type: :request do
managing_organisation: organisation, managing_organisation: organisation,
) )
end end
let(:in_progress_case_log) do let(:case_log_2022) do
FactoryBot.create( FactoryBot.create(
:case_log, :case_log,
:in_progress, startdate: Time.zone.local(2022, 12, 1),
owning_organisation: organisation, owning_organisation: organisation,
managing_organisation: organisation, managing_organisation: organisation,
) )
@ -112,9 +112,9 @@ RSpec.describe FormController, type: :request do
context "when no other sections are enabled" do context "when no other sections are enabled" do
before do before do
allow(in_progress_case_log.form).to receive(:next_incomplete_section_redirect_path).and_return("error") get "/logs/#{case_log_2022.id}/setup/check-answers", headers: headers, params: {}
get "/logs/#{in_progress_case_log.id}/household-characteristics/check-answers", headers: headers, params: {}
end end
it "does not show Save and go to next incomplete section button" do it "does not show Save and go to next incomplete section button" do
expect(page).not_to have_content("Save and go to next incomplete section") expect(page).not_to have_content("Save and go to next incomplete section")
end end

Loading…
Cancel
Save