mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-11-05 20:52:48 -05:00
Enhance comment section: update comment button to link to form and ensure form is displayed on the page
This commit is contained in:
1 parent
6b4b407e1f
commit
0ff036dbff
1 file changed
+6
-2
@@ -120,8 +120,12 @@ describe "posts/show" do
|
||||
render
|
||||
end
|
||||
|
||||
it 'shows a comment button' do
|
||||
expect(subject).to have_link "Comment", href: new_comment_path(comment: { commentable_type: "Post", commentable_id: post.id })
|
||||
it 'shows a comment button that jumps to the comment form' do
|
||||
expect(subject).to have_link "Comment", href: '#new-comment'
|
||||
end
|
||||
|
||||
it 'shows the comment form on the page' do
|
||||
expect(subject).to have_css "#new-comment form[action='#{comments_path}']"
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user