diff --git a/tests/vote_tests.py b/tests/vote_tests.py index 188f996..4e6c25b 100644 --- a/tests/vote_tests.py +++ b/tests/vote_tests.py @@ -156,5 +156,14 @@ class TestVote(LunchoTests): self.assertJsonError(rv, 409, 'Places voted more than once') return + def test_unknown_group(self): + """Try to vote in a group that doesn't exist.""" + request = {'choices': [100]} + rv = self.post('/vote/{group_id}/'.format(group_id=100), + request, + token=self.user.token) + self.assertJsonError(rv, 404, 'Group not found') + return + if __name__ == '__main__': unittest.main()