Remove H2 tag from label if question is conditional
@ -20,6 +20,8 @@ private
end
def label_tag(page_header, conditional)
page_header.blank? && !conditional ? "h1" : "h2"
return "" if conditional
page_header.blank? ? "h1" : "h2"
@ -69,6 +69,7 @@ RSpec.describe QuestionViewHelper do
context "when viewinng a conditional question" do
let(:conditional) { true }
let(:tag) { "" }
it "returns an options hash with a medium question header" do
expect(question_view_helper).to eq(legend_options_hash)