Remove token on views temporally
This commit is contained in:
@@ -34,12 +34,6 @@
|
|||||||
<% @questions.each do |question| %>
|
<% @questions.each do |question| %>
|
||||||
<%= render "polls/questions/question", question: question, token: @token %>
|
<%= render "polls/questions/question", question: question, token: @token %>
|
||||||
<% end %>
|
<% 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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -668,7 +668,6 @@ en:
|
|||||||
show:
|
show:
|
||||||
vote_answer: "Vote %{answer}"
|
vote_answer: "Vote %{answer}"
|
||||||
voted: "You have voted %{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:
|
proposal_notifications:
|
||||||
new:
|
new:
|
||||||
title: "Send message"
|
title: "Send message"
|
||||||
|
|||||||
@@ -668,7 +668,6 @@ es:
|
|||||||
show:
|
show:
|
||||||
vote_answer: "Votar %{answer}"
|
vote_answer: "Votar %{answer}"
|
||||||
voted: "Has votado %{answer}"
|
voted: "Has votado %{answer}"
|
||||||
voted_token: "Puedes apuntar este identificador de voto, para comprobar tu votación en el resultado final:"
|
|
||||||
proposal_notifications:
|
proposal_notifications:
|
||||||
new:
|
new:
|
||||||
title: "Enviar mensaje"
|
title: "Enviar mensaje"
|
||||||
|
|||||||
@@ -30,11 +30,6 @@ feature "Voter" do
|
|||||||
expect(page).not_to have_link(answer_yes.title)
|
expect(page).not_to have_link(answer_yes.title)
|
||||||
end
|
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.count).to eq(1)
|
||||||
expect(Poll::Voter.first.origin).to eq("web")
|
expect(Poll::Voter.first.origin).to eq("web")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user