Skip to content

Commit 631a9d5

Browse files
valentinbujdosomagwas
authored andcommitted
Cast vote identifier is different from the ballot identifier #202
1 parent bf5bb8b commit 631a9d5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/java/org/rulez/demokracia/pdengine/VoteCastTest.java

+9
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,13 @@ public void voteCast_records_a_secret_id_with_the_vote_cast() {
4343
voteManager.castVote(adminInfo.voteId, ballot, theCastVote);
4444
assertTrue(vote.votesCast.get(0).secretId instanceof String);
4545
}
46+
47+
@TestedBehaviour("cast vote identifier is different from the ballot identifier")
48+
@Test
49+
public void voteCast_identifier_is_different_from_the_ballot_identifier() {
50+
String ballotId = voteManager.obtainBallot(adminInfo.voteId, adminInfo.adminKey);
51+
CastVote castVote = voteManager.castVote(adminInfo.voteId, ballot, theCastVote);
52+
53+
assertNotEquals(ballotId, castVote.secretId);
54+
}
4655
}

0 commit comments

Comments
 (0)