mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-05 14:04:46 +00:00
add test for has_unpublished_changes being set when a page is scheduled for future publishing
This commit is contained in:
parent
e4545878ae
commit
24bd384e0f
1 changed files with 3 additions and 0 deletions
|
|
@ -564,6 +564,9 @@ class TestPageEdit(TestCase, WagtailTestUtils):
|
|||
# Instead a revision with approved_go_live_at should now exist
|
||||
self.assertTrue(PageRevision.objects.filter(page=child_page_new).exclude(approved_go_live_at__isnull=True).exists())
|
||||
|
||||
# The page SHOULD have the "has_unpublished_changes" flag set, because the changes are not visible as a live page yet
|
||||
self.assertTrue(child_page_new.has_unpublished_changes, "A page scheduled for future publishing should have has_unpublished_changes=True")
|
||||
|
||||
def test_edit_post_publish_now_an_already_scheduled(self):
|
||||
# First let's publish a page with a go_live_at in the future
|
||||
go_live_at = timezone.now() + timedelta(days=1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue