summaryrefslogtreecommitdiffstats
path: root/engagements/tests
diff options
context:
space:
mode:
Diffstat (limited to 'engagements/tests')
-rw-r--r--engagements/tests/test_forms.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/engagements/tests/test_forms.py b/engagements/tests/test_forms.py
index 24077e9..851f986 100644
--- a/engagements/tests/test_forms.py
+++ b/engagements/tests/test_forms.py
@@ -1,8 +1,8 @@
import pytest
from django.forms import DateInput, Select, SelectMultiple
-from engagements.forms import EngagementCreateForm, EngagementEffortCreateForm
-from engagements.models import EngagementType
+from engagements.forms import EngagementCreateForm, EngagementEffortCreateForm, EngagementStrategyCreateForm
+from engagements.models import EngagementType, RegulatoryCycle
pytestmark = pytest.mark.django_db
@@ -111,3 +111,21 @@ def test_form_engagement_type_queryset(engagement_type):
def test_form_engagement_type_queryset_without_initial():
form = EngagementCreateForm()
assert list(form.fields["engagement_type"].queryset) == list(EngagementType.objects.all())
+
+
+def test_create_engagement_strategy_form(org, user, regulatory_cycles):
+ sy = RegulatoryCycle.objects.get(start_date="2022-01-01")
+ ey = RegulatoryCycle.objects.get(start_date="2024-01-01")
+ form_data = {
+ "organisation": org,
+ "start_year": sy,
+ "end_year": ey,
+ "description": "Example description",
+ "inspector_sign_off": "2022-01-10",
+ "owned_by": user,
+ "reviewed_by": user,
+ "management_sign_off": "2022-02-10",
+ "status": "DRAFT",
+ }
+ form = EngagementStrategyCreateForm(data=form_data)
+ assert form.is_valid()