Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Sep 28, 2023
1 parent d1d04bb commit d458d1b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,20 @@ def test_detail_view_missing_file(self):
self.assertContains(response, 'height="210"')
self.assertContains(response, 'alt="File is missing"')

def test_image_expand_view(self):
url = reverse("admin:filer_image_expand_view", kwargs={
'file_id': self.file_object.pk
})
original_url = self.file_object.url

response = self.client.get(url)

self.assertContains(response, f"""<html>
<body style="margin: 0;">
<img style="max-width: 100%" src="{original_url}" />
</body>
</html>""")


class FilerClipboardAdminUrlsTests(TestCase):
def setUp(self):
Expand Down Expand Up @@ -1771,7 +1785,6 @@ def test_admin_url_params(self):


class FileIconContextTests(TestCase):

def test_image_icon_with_size(self):
"""
Image with get an aspect ratio and will be present in context
Expand Down

0 comments on commit d458d1b

Please sign in to comment.