\i Infrastructure-TestHeader.sql

\echo '$Id: 1-basic-NoChoices-1ofM.sql 452 2008-01-09 14:24:56Z dflater $'
\echo
\echo 'Small 1-of-M contest with no choices (write-ins only).'
\echo 'Ballot styles:  1'
\echo 'Reporting contexts:  1'
\echo
\echo 'This pathological case happens if there are no candidates on the'
\echo 'ballot and nobody writes in anything.  It makes no sense at all if'
\echo 'write-ins are disallowed.'

\i Infrastructure-VoteSchema.sql

insert into ReportingContext values
  ('Precinct 1');

insert into Contest (ContestId, Description, CountingLogic, N,
                     MaxWriteIns, Rotate) values
  (1, 'President, vote for at most 1', 'N-of-M', 1, 1, false);

insert into BallotStyle (StyleId, Name) values
  (1, 'Precinct 1 Style');

insert into BallotStyleContestAssociation (StyleId, ContestId) values
  (1, 1);

insert into BallotStyleReportingContextAssociation (StyleId,
						    ReportingContext) values
  (1, 'Precinct 1');

insert into Ballot (BallotId, StyleId, Accepted) values
  (0, 1, true);

\i Infrastructure-TestHook.sql
\i Infrastructure-IntegrityChecks.sql
\! ReportGenerator/ReportGenerator "Precinct 1"
\i Infrastructure-TestFooter.sql
