fix: Don't show To Subscribe on group about when there's no url to subscribe with. Fixes #4022. (#4023)
This commit is contained in:
parent
6094645e7a
commit
2f4b493575
|
@ -351,6 +351,17 @@ class GroupPagesTests(TestCase):
|
|||
for role in group.role_set.all():
|
||||
self.assertContains(r, escape(role.person.name))
|
||||
|
||||
def test_group_about_nosubscribe(self):
|
||||
group = GroupFactory()
|
||||
self.assertEqual(group.list_subscribe, '')
|
||||
url = urlreverse('ietf.group.views.group_about', kwargs=dict(acronym=group.acronym))
|
||||
r = self.client.get(url)
|
||||
self.assertNotContains(r,'To subscribe')
|
||||
group.list_subscribe='foo@example.com'
|
||||
group.save()
|
||||
r = self.client.get(url)
|
||||
self.assertContains(r,'To subscribe')
|
||||
|
||||
def test_materials(self):
|
||||
group = GroupFactory(type_id="team", acronym="testteam", name="Test Team", state_id="active")
|
||||
|
||||
|
|
|
@ -215,6 +215,7 @@
|
|||
{{ group.list_email|linkify }}
|
||||
</td>
|
||||
</tr>
|
||||
{% if group.list_subscribe %}
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
|
@ -233,6 +234,7 @@
|
|||
{{ group.list_subscribe|linkify }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
|
|
Loading…
Reference in a new issue