From ebf71d0df46c986725f7855a02e05f5e70becc3b Mon Sep 17 00:00:00 2001 From: Toby Privett Date: Tue, 1 Oct 2024 13:22:25 +0100 Subject: [PATCH] Add Civil disorder to the list of assessment questions --- app/services/assessment_questions/importer.rb | 1 + spec/services/assessment_questions/importer_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/services/assessment_questions/importer.rb b/app/services/assessment_questions/importer.rb index 0d2251da7..1673fe9e0 100644 --- a/app/services/assessment_questions/importer.rb +++ b/app/services/assessment_questions/importer.rb @@ -5,6 +5,7 @@ class Importer ASSESSMENT_QUESTIONS = [ { key: :violent, category: :risk, title: 'Violent' }, { key: :escape, category: :risk, title: 'Escape' }, + { key: :civil_disorder, category: :risk, title: 'Civil disorder' }, { key: :hold_separately, category: :risk, title: 'Must be held separately' }, { key: :self_harm, category: :risk, title: 'Self harm' }, { key: :concealed_items, category: :risk, title: 'Concealed items' }, diff --git a/spec/services/assessment_questions/importer_spec.rb b/spec/services/assessment_questions/importer_spec.rb index 28592c7b2..97487d9fd 100644 --- a/spec/services/assessment_questions/importer_spec.rb +++ b/spec/services/assessment_questions/importer_spec.rb @@ -7,7 +7,7 @@ context 'with no existing records' do it 'creates all the input items' do - expect { importer.call }.to change(AssessmentQuestion, :count).by(17) + expect { importer.call }.to change(AssessmentQuestion, :count).by(18) end it 'creates `Violent`' do @@ -34,7 +34,7 @@ end it 'creates only the missing item' do - expect { importer.call }.to change(AssessmentQuestion, :count).by(16) + expect { importer.call }.to change(AssessmentQuestion, :count).by(17) end end