diff --git a/app/helpers/details_table_helper.rb b/app/helpers/details_table_helper.rb
index 9d7c16f22..b7f880fdf 100644
--- a/app/helpers/details_table_helper.rb
+++ b/app/helpers/details_table_helper.rb
@@ -4,7 +4,9 @@ module DetailsTableHelper
list = attribute[:value].map { |value| "
#{value}" }.join
simple_format(list, { class: "govuk-list govuk-list--bullet" }, wrapper_tag: "ul")
else
- value = attribute[:value].is_a?(Array) ? attribute[:value].first : attribute[:value] || "You didn’t answer this question".html_safe
+ return simple_format(attribute[:value].first.to_s, { class: "govuk-body" }, wrapper_tag: "p") if attribute[:value].is_a?(Array)
+
+ value = attribute[:value].presence || "You didn’t answer this question".html_safe
simple_format(value.to_s, { class: "govuk-body" }, wrapper_tag: "p")
end
diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb
index 73972c4c3..ab6fc489c 100644
--- a/spec/features/schemes_spec.rb
+++ b/spec/features/schemes_spec.rb
@@ -552,6 +552,13 @@ RSpec.describe "Schemes scheme Features" do
fill_in_and_save_second_location
expect(page).to have_content "Check your answers"
end
+
+ it "dispays correct text for uunanswered questions" do
+ fill_in_and_save_location
+ location.update!(location_code: nil)
+ visit "/schemes/#{scheme.id}/locations/#{location.id}/check-answers"
+ expect(page).to have_content "You didn’t answer this question"
+ end
end
context "when viewing locations" do