Remove token on views temporally
This commit is contained in:
@@ -34,12 +34,6 @@
|
||||
<% @questions.each do |question| %>
|
||||
<%= render "polls/questions/question", question: question, token: @token %>
|
||||
<% end %>
|
||||
|
||||
<% if poll_voter_token(@poll, current_user).empty? %>
|
||||
<div class="callout token-message js-token-message" style="display: none">
|
||||
<%= t("poll_questions.show.voted_token") %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -668,7 +668,6 @@ en:
|
||||
show:
|
||||
vote_answer: "Vote %{answer}"
|
||||
voted: "You have voted %{answer}"
|
||||
voted_token: "You can write down this vote identifier, to check your vote on the final results:"
|
||||
proposal_notifications:
|
||||
new:
|
||||
title: "Send message"
|
||||
|
||||
@@ -668,7 +668,6 @@ es:
|
||||
show:
|
||||
vote_answer: "Votar %{answer}"
|
||||
voted: "Has votado %{answer}"
|
||||
voted_token: "Puedes apuntar este identificador de voto, para comprobar tu votación en el resultado final:"
|
||||
proposal_notifications:
|
||||
new:
|
||||
title: "Enviar mensaje"
|
||||
|
||||
@@ -30,11 +30,6 @@ feature "Voter" do
|
||||
expect(page).not_to have_link(answer_yes.title)
|
||||
end
|
||||
|
||||
expect(page).to have_css(".js-token-message", visible: true)
|
||||
token = find(:css, ".js-question-answer")[:href].gsub(/.+?(?=token)/, "").gsub("token=", "")
|
||||
|
||||
expect(page).to have_content "You can write down this vote identifier, to check your vote on the final results: #{token}"
|
||||
|
||||
expect(Poll::Voter.count).to eq(1)
|
||||
expect(Poll::Voter.first.origin).to eq("web")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user