show link to sign in for no connect users

This commit is contained in:
palomahnhp
2016-02-03 10:03:39 +01:00
parent 543d760069
commit 837da1b6b2
6 changed files with 94 additions and 24 deletions

View File

@@ -299,6 +299,28 @@ feature 'Votes' do
end
end
scenario 'Not logged user trying to vote comments in debates', :js do
debate = create(:debate)
comment = create(:comment, commentable: debate)
visit comment_path(debate)
within("#comment_#{comment.id}") do
find("div.votes").hover
expect_message_you_need_to_sign_in_to_vote_comments
end
end
scenario 'Not logged user trying to vote comments in proposals', :js do
proposal = create(:proposal)
comment = create(:comment, commentable: proposal)
visit comment_path(comment)
within("#comment_#{comment.id}_reply") do
find("div.votes").hover
expect_message_you_need_to_sign_in_to_vote_comments
end
end
scenario 'Anonymous user trying to vote debates', :js do
user = create(:user)
debate = create(:debate)