diff --git a/modoboa/core/tests/test_views.py b/modoboa/core/tests/test_views.py index 9f7b24787..f4cb7cbc5 100644 --- a/modoboa/core/tests/test_views.py +++ b/modoboa/core/tests/test_views.py @@ -4,6 +4,7 @@ from testfixtures import compare from django import forms from django.urls import reverse +from django.test import override_settings from modoboa.lib.tests import ModoTestCase from modoboa.parameters import forms as param_forms, tools as param_tools @@ -159,6 +160,20 @@ class DashboardTestCase(ModoTestCase): response = self.client.get(url) self.assertNotContains(response, "Features looking for sponsoring") + @override_settings(DISABLE_RSS=False) + def test_enable_rss(self): + """Load dashboard with DISABLE_RSS = False""" + url = reverse("core:dashboard") + response = self.client.get(url) + self.assertContains(response, 'href="https://modoboa.org/en/weblog/') + + @override_settings(DISABLE_RSS=True) + def test_disable_rss(self): + """Load dashboard with DISABLE_RSS = True""" + url = reverse("core:dashboard") + response = self.client.get(url) + self.assertNotContains(response, 'https://modoboa.org/en/weblog/') + def test_root_dispatch(self): """Check root dispatching.""" url = reverse("core:root")