Fix answerbox comments view specs

This commit is contained in:
Andreas Nedbal 2023-11-05 11:16:28 +01:00 committed by Andreas Nedbal
parent a00d268f56
commit 9ce68bffb2
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ describe "answerbox/_comments.html.haml", type: :view do
it "shows the correct number of smiles" do it "shows the correct number of smiles" do
html = Nokogiri::HTML.parse(rendered) 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") expect(html.css(selector).text).to eq("5")
end end
end end
@ -94,7 +94,7 @@ describe "answerbox/_comments.html.haml", type: :view do
it "displays the comment as smiled" do it "displays the comment as smiled" do
html = Nokogiri::HTML.parse(rendered) 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 expect(html.css(selector)).to_not be_empty
end end
end end