Fix link to comments on admin view for debates

This commit is contained in:
Julian Herrero
2022-06-13 16:16:07 +02:00
committed by Javi Martín
parent 845f12879a
commit b9ec40325c
2 changed files with 11 additions and 1 deletions

View File

@@ -19,4 +19,14 @@ describe "Admin debates", :admin do
expect(page).to have_content(debate.title)
expect(page).to have_content(debate.description)
end
scenario "Comments link" do
debate = create(:debate)
comment = create(:comment, commentable: debate)
visit admin_debate_path(debate)
click_link "1 comment"
expect(page).to have_content(comment.body)
end
end