diff --git a/spec/features/form/tasklist_page_spec.rb b/spec/features/form/tasklist_page_spec.rb index dcc50d893..a9511e8c9 100644 --- a/spec/features/form/tasklist_page_spec.rb +++ b/spec/features/form/tasklist_page_spec.rb @@ -26,14 +26,6 @@ RSpec.describe "Task List" do sign_in user end - it "displays a section status" do - visit("/case_logs/#{empty_case_log.id}") - - assert_selector ".govuk-tag", text: /Not started/, count: 8 - assert_selector ".govuk-tag", text: /Completed/, count: 0 - assert_selector ".govuk-tag", text: /Cannot start yet/, count: 1 - end - it "shows the correct status if one section is completed" do answer_all_questions_in_income_subsection(empty_case_log) visit("/case_logs/#{empty_case_log.id}") diff --git a/spec/requests/case_log_controller_spec.rb b/spec/requests/case_log_controller_spec.rb index aab5b02a9..ecfa5b2fe 100644 --- a/spec/requests/case_log_controller_spec.rb +++ b/spec/requests/case_log_controller_spec.rb @@ -190,6 +190,12 @@ RSpec.describe CaseLogsController, type: :request do expect(response.body).to match("Tasklist for log") expect(response.body).to match(case_log.id.to_s) end + + it "displays a section status for a case log" do + assert_select ".govuk-tag", text: /Not started/, count: 8 + assert_select ".govuk-tag", text: /Completed/, count: 0 + assert_select ".govuk-tag", text: /Cannot start yet/, count: 1 + end end context "case logs that are not owned or managed by your organisation" do