diff --git a/app/views/polls/questions/_answers.html.erb b/app/views/polls/questions/_answers.html.erb
index 7cdb50cfb..7d9bc4cac 100644
--- a/app/views/polls/questions/_answers.html.erb
+++ b/app/views/polls/questions/_answers.html.erb
@@ -1,8 +1,8 @@
- <% if can?(:answer, question) %>
+ <% if can?(:answer, question) && !question.poll.voted_in_booth?(current_user) %>
<% question.question_answers.each do |answer| %>
- <% if @answers_by_question_id[question.id] == answer.title &&
- (!voted_before_sign_in(question) ||
+ <% if @answers_by_question_id[question.id] == answer.title &&
+ (!voted_before_sign_in(question) ||
question.poll.voted_in_booth?(current_user)) %>
">
diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb
index 126617684..80d8db60e 100644
--- a/app/views/polls/show.html.erb
+++ b/app/views/polls/show.html.erb
@@ -50,10 +50,10 @@
<%= t("polls.show.already_voted_in_web") %>
<% end %>
+ <% end %>
- <% @questions.each do |question| %>
- <%= render 'polls/questions/question', question: question, token: @token %>
- <% end %>
+ <% @questions.each do |question| %>
+ <%= render 'polls/questions/question', question: question, token: @token %>
<% end %>
diff --git a/spec/features/polls/polls_spec.rb b/spec/features/polls/polls_spec.rb
index 8f7a9b2de..d2be04447 100644
--- a/spec/features/polls/polls_spec.rb
+++ b/spec/features/polls/polls_spec.rb
@@ -319,10 +319,14 @@ feature 'Polls' do
visit poll_path(poll)
expect(page).to have_content "You have already participated in a physical booth. You can not participate again."
- expect(page).to have_content('Han Solo')
- expect(page).to have_content('Chewbacca')
- expect(page).to_not have_link('Han Solo')
- expect(page).to_not have_link('Chewbacca')
+
+ within("#poll_question_#{question.id}_answers") do
+ expect(page).to have_content('Han Solo')
+ expect(page).to have_content('Chewbacca')
+
+ expect(page).to_not have_link('Han Solo')
+ expect(page).to_not have_link('Chewbacca')
+ end
end
end