diff --git a/bookwyrm/templates/author/edit_author.html b/bookwyrm/templates/author/edit_author.html index 103341bf..54d7f4f1 100644 --- a/bookwyrm/templates/author/edit_author.html +++ b/bookwyrm/templates/author/edit_author.html @@ -12,7 +12,9 @@

{% trans "Added:" %} {{ author.created_date | naturaltime }}

{% trans "Updated:" %} {{ author.updated_date | naturaltime }}

+ {% if author.last_edited_by %}

{% trans "Last edited by:" %} {{ author.last_edited_by.display_name }}

+ {% endif %}
diff --git a/bookwyrm/tests/views/test_author.py b/bookwyrm/tests/views/test_author.py index 7a0065c9..03c027fa 100644 --- a/bookwyrm/tests/views/test_author.py +++ b/bookwyrm/tests/views/test_author.py @@ -9,6 +9,7 @@ from django.test.client import RequestFactory from bookwyrm import forms, models, views from bookwyrm.activitypub import ActivitypubResponse +from bookwyrm.tests.validate_html import validate_html class AuthorViews(TestCase): @@ -54,7 +55,7 @@ class AuthorViews(TestCase): is_api.return_value = False result = view(request, author.id) self.assertIsInstance(result, TemplateResponse) - result.render() + validate_html(result.render()) self.assertEqual(result.status_code, 200) self.assertEqual(result.status_code, 200) @@ -75,7 +76,7 @@ class AuthorViews(TestCase): result = view(request, author.id) self.assertIsInstance(result, TemplateResponse) - result.render() + validate_html(result.render()) self.assertEqual(result.status_code, 200) self.assertEqual(result.status_code, 200)