Fix invalid HTML in comment votes

We forgot to change the `span` tag when we replaced links with buttons
in commit ba0d21b46.
This commit is contained in:
Javi Martín
2024-03-05 00:36:12 +01:00
parent 8ac1acc5ea
commit a101608ebe
3 changed files with 17 additions and 4 deletions

View File

@@ -5,6 +5,14 @@ describe Comments::VotesComponent do
let(:comment) { create(:comment, user: user) }
let(:component) { Comments::VotesComponent.new(comment) }
it "generates valid HTML" do
render_inline component
expect(page).not_to have_css "span form"
expect(page).to have_css "div.in-favor > form"
expect(page).to have_css "div.against > form"
end
describe "aria-pressed and method attributes" do
it "have expected values when the in-favor button is pressed" do
comment.vote_by(voter: user, vote: "yes")