Skip to content

Commit

Permalink
Extended "test_create_view" to also ensure a forrect form action URL
Browse files Browse the repository at this point in the history
  • Loading branch information
benmth committed Jun 4, 2022
1 parent a25dd9b commit 4f3af21
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions wagtail_localize/modeladmin/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ def test_create_view(self):
create_url = reverse("wagtail_localize_test_testmodel_modeladmin_create")
response = self.client.get(create_url)

# Check for correct Form Action
self.assertContains(
response,
'<form action="/admin/wagtail_localize_test/testmodel/create/?locale=en"',
)

# Check, if other Language is available in Dropdown
self.assertContains(
response,
'<a href="/admin/wagtail_localize_test/testmodel/create/?locale=de"',
Expand Down

0 comments on commit 4f3af21

Please sign in to comment.