feat(test): Add rss feed test

This commit is contained in:
2025-08-09 16:46:07 +02:00
parent 426f4b3d8b
commit 4b03f99971

View File

@@ -141,4 +141,16 @@ class BasicViewTest(TestCase):
self.assertContains(response, "ReportComment1")
self.assertContains(response, '<form action="allow" class="">')
def test_rss_logged_in(self):
self.client.login(username='testuser0', password='12345')
response = self.client.get(reverse('rss'))
self.assertEqual(response.status_code, 200)
self.assertContains(response, "TestAdoption0")
self.assertNotContains(response, "TestAdoption5") # Should not be active, therefore not shown
def test_rss_anonymous(self):
response = self.client.get(reverse('rss'))
self.assertEqual(response.status_code, 200)
self.assertContains(response, "TestAdoption1")
self.assertNotContains(response, "TestAdoption5")