Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/input_objects/pages/conditions_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def update_condition

def routing_answer_options
options = page.answer_settings.selection_options.map { |option| OpenStruct.new(value: option.attributes[:name], label: option.attributes[:name]) }
options << OpenStruct.new(value: :none_of_the_above.to_s, label: I18n.t("page_conditions.none_of_the_above")) if page.is_optional
options << OpenStruct.new(value: I18n.t("page_conditions.none_of_the_above"), label: I18n.t("page_conditions.none_of_the_above")) if page.is_optional

options
end
Expand Down
2 changes: 1 addition & 1 deletion spec/input_objects/pages/conditions_input_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
expect(result).to eq([
OpenStruct.new(value: "Option 1", label: "Option 1"),
OpenStruct.new(value: "Option 2", label: "Option 2"),
OpenStruct.new(value: :none_of_the_above.to_s,
OpenStruct.new(value: I18n.t("page_conditions.none_of_the_above"),
label: I18n.t("page_conditions.none_of_the_above")),
])
end
Expand Down