Fix record_voter_participation and usage on specs
This commit is contained in:
@@ -46,7 +46,7 @@ describe Poll::Answer do
|
||||
answer = create(:poll_answer, question: question, author: author, answer: "Yes")
|
||||
expect(answer.poll.voters).to be_blank
|
||||
|
||||
answer.record_voter_participation
|
||||
answer.record_voter_participation('token')
|
||||
expect(poll.reload.voters.size).to eq(1)
|
||||
voter = poll.voters.first
|
||||
|
||||
@@ -57,12 +57,12 @@ describe Poll::Answer do
|
||||
|
||||
it "updates a poll_voter with user and poll data" do
|
||||
answer = create(:poll_answer, question: question, author: author, answer: "Yes")
|
||||
answer.record_voter_participation
|
||||
answer.record_voter_participation('token')
|
||||
|
||||
expect(poll.reload.voters.size).to eq(1)
|
||||
|
||||
answer = create(:poll_answer, question: question, author: author, answer: "No")
|
||||
answer.record_voter_participation
|
||||
answer.record_voter_participation('token')
|
||||
|
||||
expect(poll.reload.voters.size).to eq(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user