Skip to content

Commit

Permalink
revert old endpoint name
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Mar 4, 2024
1 parent 0cb0bb8 commit 59fe89d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Changelog

- Add footer_top field in settings, to manage a new footer row before columns.
[cekk]
- [BREAKING] Rename service endpoint to *@editable-footer-data* and changed its data structure.
[cekk]


1.2.1 (2024-01-17)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
factory=".get.EditableFooterGet"
for="Products.CMFCore.interfaces.ISiteRoot"
permission="zope2.View"
name="@editable-footer-data"
name="@footer-columns"
/>

<cache:ruleset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ class EditableFooterDataServiceTest(BaseTest):
layer = VOLTO_EDITABLEFOOTER_API_FUNCTIONAL_TESTING

def test_route_exists(self):
response = self.api_session.get("/@editable-footer-data")
response = self.api_session.get("/@footer-columns")
self.assertEqual(response.status_code, 200)
self.assertEqual(response.headers.get("Content-Type"), "application/json")

def test_return_data_structure(self):
response = self.api_session.get("/@editable-footer-data")
response = self.api_session.get("/@footer-columns")
result = response.json()

self.assertIn("footer_top", result)
self.assertIn("footer_columns", result)

def test_return_json_data_absolute_links_converted_for_footer_columns(self):
response = self.api_session.get("/@editable-footer-data")
response = self.api_session.get("/@footer-columns")
self.assertEqual(response.status_code, 200)
result = response.json()
# self.footer_columns_value has relative links, but the result should have absolute links
Expand All @@ -90,7 +90,7 @@ def setUp(self):
def test_return_json_data_with_portal_url_if_plone_volto_installed_and_not_configured(
self,
):
response = self.api_session.get("/@editable-footer-data")
response = self.api_session.get("/@footer-columns")
self.assertEqual(response.status_code, 200)
result = response.json()
# self.footer_columns_value has relative links, but the result should have absolute links
Expand All @@ -110,7 +110,7 @@ def test_return_json_data_with_frontend_domain_if_set(self):
settings.frontend_domain = "http://foo.org"
commit()

response = self.api_session.get("/@editable-footer-data")
response = self.api_session.get("/@footer-columns")
self.assertEqual(response.status_code, 200)
result = response.json()
# self.footer_columns_value has relative links, but the result should have absolute links
Expand Down

0 comments on commit 59fe89d

Please sign in to comment.