2
0

calculate-max-writeins.spec.js 666 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright 2018 Scytl Secure Electronic Voting SA
  3. *
  4. * All rights reserved
  5. *
  6. * See our extended copyright notice in *file 'Copyright.txt' which is part of this source code package
  7. */
  8. /* global _ */
  9. /* global OV */
  10. describe('Calculate max writeins', function () {
  11. 'use strict';
  12. var session = require('../../../src/lib/client/session.js');
  13. var response = require('./mocks/ballot_with_writeins.json');
  14. it('should obtain max possible number of writeins', function () {
  15. var maximumPossibleWriteins = OV.writeInsParser.calculateMaximumPossibleWriteins(response.ballot);
  16. expect(maximumPossibleWriteins).toBe(10);
  17. });
  18. });