Skip to content

Commit

Permalink
Merge pull request #1103 from nationalarchives/redirect-transactional…
Browse files Browse the repository at this point in the history
…-licence

Redirect transactional licence to computational
  • Loading branch information
dragon-dxw authored Feb 21, 2024
2 parents c5937b5 + 1942d38 commit 897d272
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
views.ComputationalLicenceFormView.as_view(),
name="computational_licence_form",
),
path(
"transactional-licence-form",
lambda request: HttpResponseRedirect("/computational-licence-form"),
name="transactional-licence-form",
),
path(
"what-to-expect",
lambda request: HttpResponseRedirect("/about-this-service"),
Expand Down
17 changes: 17 additions & 0 deletions judgments/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,23 @@ def test_static_page(self, mock_search_judgments_and_parse_response):
"The Find Case Law service provides public access to court judgments and tribunal decisions.",
) # actual content of page

def test_static_pages(self):
for url in [
"computational-licence-form",
"transactional-licence-form",
"what-to-expect",
"about-this-service",
"how-to-use-this-service",
"privacy-notice",
"accessibility-statement",
"open-justice-licence",
"terms-of-use",
"publishing-policy",
"robots.txt",
]:
response = self.client.get(f"/{url}", follow=True)
assert response.status_code == 200


class TestBackLink(TestCase):
def test_referrer_is_search_page_without_query(self):
Expand Down

0 comments on commit 897d272

Please sign in to comment.