mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-28 16:38:17 +00:00
Improved test_post_reorder test
This commit is contained in:
parent
c7ec5792f6
commit
56647908d0
1 changed files with 4 additions and 0 deletions
|
|
@ -218,6 +218,10 @@ class TestEditorsPicksEditView(TestCase, WagtailTestUtils):
|
|||
# User should be redirected back to the index
|
||||
self.assertRedirects(response, reverse('wagtailsearch_editorspicks_index'))
|
||||
|
||||
# Check that the ordering has been saved correctly
|
||||
self.assertEqual(models.EditorsPick.objects.get(id=self.editors_pick.id).sort_order, 1)
|
||||
self.assertEqual(models.EditorsPick.objects.get(id=self.editors_pick_2.id).sort_order, 0)
|
||||
|
||||
# Check that the recommendations were reordered
|
||||
self.assertEqual(models.Query.get("Hello").editors_picks.all()[0], self.editors_pick_2)
|
||||
self.assertEqual(models.Query.get("Hello").editors_picks.all()[1], self.editors_pick)
|
||||
|
|
|
|||
Loading…
Reference in a new issue