diff --git a/app/views/legislation/questions/_question.html.erb b/app/views/legislation/questions/_question.html.erb index 7c91b52ca..aa910883c 100644 --- a/app/views/legislation/questions/_question.html.erb +++ b/app/views/legislation/questions/_question.html.erb @@ -8,7 +8,7 @@
diff --git a/spec/system/legislation/questions_spec.rb b/spec/system/legislation/questions_spec.rb index bbf55184c..b217ad7f4 100644 --- a/spec/system/legislation/questions_spec.rb +++ b/spec/system/legislation/questions_spec.rb @@ -109,5 +109,15 @@ describe "Legislation" do expect(page).not_to have_selector(:link_or_button, "Submit answer") end + + scenario "render link to questions comments with anchor" do + question = create(:legislation_question, process: process, title: "Question without comments") + + visit legislation_process_path(process) + + expect(page).to have_link "No comments", href: legislation_process_question_path(process, + question, + anchor: "comments") + end end end