From 3af40b9e291956b692778507b1bd14fa96de20bd Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Wed, 24 Jan 2018 16:25:24 +0000 Subject: [PATCH] Confirm that draft rounds are not shown --- opentech/apply/funds/tests/test_models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opentech/apply/funds/tests/test_models.py b/opentech/apply/funds/tests/test_models.py index e0237520c..0c6fcc20c 100644 --- a/opentech/apply/funds/tests/test_models.py +++ b/opentech/apply/funds/tests/test_models.py @@ -48,6 +48,12 @@ class TestFundModel(TestCase): RoundFactory(start_date=next_round_start, end_date=None, parent=self.fund) self.assertEqual(self.fund.open_round, open_round) + def test_can_not_be_open_with_draft_round(self): + new_round = RoundFactory(parent=self.fund) + new_round.live = False + new_round.save() + self.assertEqual(self.fund.open_round, None) + class TestRoundModel(TestCase): def setUp(self): -- GitLab