Merge pull request #2009 from consul/votable_by_fix
Fixed already-answered logic
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<% poll_group.each do |poll| %>
|
||||
<div class="poll with-image">
|
||||
<% if user_signed_in? && !poll.votable_by?(current_user) %>
|
||||
<% if user_signed_in? && !current_user.unverified? && !poll.votable_by?(current_user) %>
|
||||
<div class="icon-poll-answer already-answer" title="<%= t("polls.index.already_answer") %>">
|
||||
<span class="show-for-sr"><%= t("polls.index.already_answer") %></span>
|
||||
</div>
|
||||
|
||||
@@ -94,6 +94,9 @@ feature 'Polls' do
|
||||
end
|
||||
|
||||
scenario 'Level 1 users' do
|
||||
visit polls_path
|
||||
expect(page).to_not have_selector('.already-answer')
|
||||
|
||||
poll.update(geozone_restricted: true)
|
||||
poll.geozones << geozone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user