-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #528: Include contacts when adding a project
- Loading branch information
Showing
2 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -459,8 +459,8 @@ def _get_xls_form(self, form_name): | |
'details-url': 'http://www.test.org', | ||
'details-contacts-TOTAL_FORMS': 1, | ||
'details-contacts-INITIAL_FORMS': 0, | ||
'details-contacts-0-name': '', | ||
'details-contacts-0-email': '', | ||
'details-contacts-0-name': "John Lennon", | ||
'details-contacts-0-email': '[email protected]', | ||
'details-contacts-0-tel': '' | ||
} | ||
PERMISSIONS_POST_DATA = { | ||
|
@@ -499,6 +499,9 @@ def test_full_flow_valid(self): | |
proj = Project.objects.get(organization=self.org, name='Test Project') | ||
assert proj.slug == 'test-project' | ||
assert proj.description == 'This is a test project' | ||
assert len(proj.contacts) == 1 | ||
assert proj.contacts[0]['name'] == "John Lennon" | ||
assert proj.contacts[0]['email'] == '[email protected]' | ||
assert ProjectRole.objects.filter(project=proj).count() == 3 | ||
for r in ProjectRole.objects.filter(project=proj): | ||
if r.user.username == 'org_member_1': | ||
|
@@ -535,6 +538,9 @@ def test_full_flow_invalid_xlsform(self): | |
proj = Project.objects.get(organization=self.org, name='Test Project') | ||
assert proj.slug == 'test-project' | ||
assert proj.description == 'This is a test project' | ||
assert len(proj.contacts) == 1 | ||
assert proj.contacts[0]['name'] == "John Lennon" | ||
assert proj.contacts[0]['email'] == '[email protected]' | ||
for r in ProjectRole.objects.filter(project=proj): | ||
if r.user.username == 'org_member_1': | ||
assert r.role == 'PM' | ||
|
@@ -576,6 +582,9 @@ def test_full_flow_long_slug(self): | |
proj = Project.objects.get(organization=self.org, slug=expected_slug) | ||
assert proj.slug == expected_slug | ||
assert proj.description == 'This is a test project' | ||
assert len(proj.contacts) == 1 | ||
assert proj.contacts[0]['name'] == "John Lennon" | ||
assert proj.contacts[0]['email'] == '[email protected]' | ||
assert ProjectRole.objects.filter(project=proj).count() == 3 | ||
for r in ProjectRole.objects.filter(project=proj): | ||
if r.user.username == 'org_member_1': | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters