Commit 79fdf23c authored by Simon Hanna's avatar Simon Hanna

Add test for pending subscriptions

parent dcea664b
......@@ -61,6 +61,23 @@ class ListSummaryPageTest(ViewTestCase):
self.assertContains(response, '<form ')
self.assertContains(response, 'Subscribe')
def test_pending_subscription_request(self):
mlist = self.mm_client.get_list('')
mlist.settings['subscription_policy'] = 'moderate'
self.client.login(username='testuser', password='testpass')
response = self.client.get(reverse('list_summary',
args=('', )))
self.assertEqual(response.status_code, 200)
self.assertTrue('You have a subscription request pending. '
'If you don\'t hear back soon, '
'please contact the list owners.' in response.content)
self.assertNotContains(response, 'Unsubscribe')
self.assertNotContains(response, 'Subscribe')
def test_unsubscribe_button_is_available(self):
mlist = self.mm_client.get_list('')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment