From 9ce68bffb227023ecb8ff324eb48f4bba1ebd30d Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 5 Nov 2023 11:16:28 +0100 Subject: [PATCH] Fix answerbox comments view specs --- spec/views/answerbox/_comments.html.haml_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/views/answerbox/_comments.html.haml_spec.rb b/spec/views/answerbox/_comments.html.haml_spec.rb index 3af138d6..cdf2d46f 100644 --- a/spec/views/answerbox/_comments.html.haml_spec.rb +++ b/spec/views/answerbox/_comments.html.haml_spec.rb @@ -78,7 +78,7 @@ describe "answerbox/_comments.html.haml", type: :view do it "shows the correct number of smiles" do html = Nokogiri::HTML.parse(rendered) - selector = %(li.comment[data-comment-id="#{comment.id}"] button[data-action="smile"]>span) + selector = %(li.comment[data-comment-id="#{comment.id}"] button.smile>span) expect(html.css(selector).text).to eq("5") end end @@ -94,7 +94,7 @@ describe "answerbox/_comments.html.haml", type: :view do it "displays the comment as smiled" do html = Nokogiri::HTML.parse(rendered) - selector = %(li.comment[data-comment-id="#{comment.id}"] button[data-action="unsmile"]) + selector = %(li.comment[data-comment-id="#{comment.id}"] button.unsmile) expect(html.css(selector)).to_not be_empty end end