From 3cc0dc390bb2635a1192b669f543410d8fd1e59a Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Wed, 10 May 2023 13:54:15 +0200 Subject: Do not duplicate "Edit on GitHub" link for tags Closes #963. --- pydis_site/apps/content/tests/test_views.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pydis_site/apps/content/tests') diff --git a/pydis_site/apps/content/tests/test_views.py b/pydis_site/apps/content/tests/test_views.py index e4f898ef..cfc580c0 100644 --- a/pydis_site/apps/content/tests/test_views.py +++ b/pydis_site/apps/content/tests/test_views.py @@ -387,6 +387,14 @@ class TagViewTests(django.test.TestCase): response.context.get("page") ) + def test_tags_have_no_edit_on_github_link(self): + """Tags should not have the standard edit on GitHub link.""" + # The standard "Edit on GitHub" link should not be displayed on tags + # because they have their own GitHub icon that links there. + Tag.objects.create(name="example", body="Joe William Banks", last_commit=self.commit) + response = self.client.get("/pages/tags/example/") + self.assertNotContains(response, "Edit on GitHub") + def test_tag_root_page(self): """Test the root tag page which lists all tags.""" Tag.objects.create(name="tag-1", last_commit=self.commit) -- cgit v1.2.3