This commit is contained in:
2026-09-08 05:10:33 +02:00
parent 68a7c3b002
commit 36e5378f19
6 changed files with 16 additions and 9 deletions
+2 -2
View File
@@ -55,7 +55,7 @@ def test_newer_post_links_to_the_next_older_post(app_server):
assert r.json()["next_post_url"] == f"/posts/{older['slug']}"
html = requests.get(f"{BASE_URL}/posts/{newer['slug']}")
assert f'href="/posts/{older["slug"]}" class="back-link next-post-link"' in html.text
assert f'href="/posts/{older["slug"]}" class="next-post-link"' in html.text
assert f'<link rel="next" href="{BASE_URL}/posts/{older["slug"]}">' in html.text
@@ -69,4 +69,4 @@ def test_next_post_link_is_absent_when_the_url_is_none(app_server):
assert "next-post-link" not in html
assert 'rel="next"' not in html
else:
assert f'href="{data["next_post_url"]}" class="back-link next-post-link"' in html
assert f'href="{data["next_post_url"]}" class="next-post-link"' in html