\i Infrastructure-TestHeader.sql

\echo '$Id: 0-integrity-EndorsedAlias.sql 95 2007-03-19 13:59:35Z dflater $'
\echo
\echo 'Verify that endorsements of aliases are detected by the integrity'
\echo 'check.  The "All results should be empty" notice does not apply to'
\echo 'this test case.  Refer instead to the "Expected results" printed at'
\echo 'the bottom.'

\i 0-integrity-common.sql

update Endorsement
  set ChoiceId = 3
  where ChoiceId = 2;

insert into Alias (AliasId, ChoiceId) values (3, 2);

-- Get rid of double votes that could confuse the tester.
delete from VoterInput;

\i Infrastructure-IntegrityChecks.sql

\echo 'Expected results:'
\echo '         Endorsed Aliases'
\echo '     party      | choiceid | value '
\echo '----------------+----------+-------'
\echo ' Moderate Party |        3 |     1'
\echo '(1 row)'

\i Infrastructure-TestFooter.sql
