aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/resources
diff options
context:
space:
mode:
Diffstat (limited to 'pydis_site/apps/resources')
-rw-r--r--pydis_site/apps/resources/tests/test_views.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pydis_site/apps/resources/tests/test_views.py b/pydis_site/apps/resources/tests/test_views.py
index 0af5ce5f..a2a203ce 100644
--- a/pydis_site/apps/resources/tests/test_views.py
+++ b/pydis_site/apps/resources/tests/test_views.py
@@ -15,3 +15,15 @@ class TestResourcesView(TestCase):
url = reverse("resources:index")
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
+
+ def test_resources_with_valid_argument(self):
+ """Check that you can resolve the resources when passing a valid argument."""
+ url = reverse("resources:index", kwargs={"resource_type": "book"})
+ response = self.client.get(url)
+ self.assertEqual(response.status_code, 200)
+
+ def test_resources_with_invalid_argument(self):
+ """Check that you can resolve the resources when passing an invalid argument."""
+ url = reverse("resources:index", kwargs={"resource_type": "urinal-cake"})
+ response = self.client.get(url)
+ self.assertEqual(response.status_code, 404)