diff --git a/app/views/admin/poll/questions/show.html.erb b/app/views/admin/poll/questions/show.html.erb index 35b09b9f9..4a6a98378 100644 --- a/app/views/admin/poll/questions/show.html.erb +++ b/app/views/admin/poll/questions/show.html.erb @@ -35,7 +35,7 @@
<%= VotationType.human_attribute_name("vote_type.#{@question.vote_type}") %>

- <% if @question.max_votes.present? %> + <% if @question.multiple? %>

<%= VotationType.human_attribute_name("max_votes") %>
diff --git a/spec/system/admin/poll/questions_spec.rb b/spec/system/admin/poll/questions_spec.rb index 3997c3af7..1bb7a55fb 100644 --- a/spec/system/admin/poll/questions_spec.rb +++ b/spec/system/admin/poll/questions_spec.rb @@ -88,6 +88,7 @@ describe "Admin poll questions", :admin do expect(page).to have_content "Question with unique answer" expect(page).to have_content "Unique answer" + expect(page).not_to have_content "Maximum number of votes" end scenario "Multiple" do @@ -104,6 +105,7 @@ describe "Admin poll questions", :admin do expect(page).to have_content "Question with multiple answers" expect(page).to have_content "Multiple answers" + expect(page).to have_text "Maximum number of votes 6", normalize_ws: true end scenario "Open-ended" do @@ -119,6 +121,7 @@ describe "Admin poll questions", :admin do expect(page).to have_content "What do you want?" expect(page).to have_content "Open-ended" + expect(page).not_to have_content "Maximum number of votes" end end end