diff --git a/ietf/group/tests_info.py b/ietf/group/tests_info.py index d015f270f..73007eeee 100644 --- a/ietf/group/tests_info.py +++ b/ietf/group/tests_info.py @@ -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") diff --git a/ietf/templates/group/group_about.html b/ietf/templates/group/group_about.html index 3bdd4da21..e9cb7931a 100644 --- a/ietf/templates/group/group_about.html +++ b/ietf/templates/group/group_about.html @@ -215,6 +215,7 @@ {{ group.list_email|linkify }} + {% if group.list_subscribe %}