Skip to content

Commit

Permalink
Adds test that verifies that checkin and checkout are allowed on the
Browse files Browse the repository at this point in the history
portal
  • Loading branch information
wesleybl committed Oct 3, 2024
1 parent 0f9e671 commit 5752f96
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plone/app/iterate/tests/test_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ def test_container_control_checkin_allowed_with_no_policy(self):
control = Control(self.portal, self.layer["request"])
self.assertFalse(control.checkin_allowed())

def test_container_control_checkout_allowed_with_portal(self):
control = Control(self.portal, self.layer["request"])
self.assertTrue(control.checkout_allowed())

def test_container_control_checkout_allowed_with_no_policy(self):
control = Control(self.portal.docs, self.layer["request"])
self.assertFalse(control.checkout_allowed())
Expand Down
8 changes: 8 additions & 0 deletions plone/app/iterate/tests/test_iterate.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,18 @@ def test_default_page_is_kept_in_folder(self):
self.assertEqual(folder.getProperty("default_page", ""), "doc1")
self.assertEqual(folder.getDefaultPage(), "doc1")

def test_control_checkin_allowed_with_portal(self):
control = Control(self.portal, self.layer["request"])
self.assertTrue(control.checkin_allowed())

def test_control_checkin_allowed_with_no_policy(self):
control = Control(self.portal, self.layer["request"])
self.assertFalse(control.checkin_allowed())

def test_control_checkout_allowed_with_portal(self):
control = Control(self.portal, self.layer["request"])
self.assertTrue(control.checkout_allowed())

def test_control_checkout_allowed_with_no_policy(self):
control = Control(self.portal.docs, self.layer["request"])
self.assertFalse(control.checkout_allowed())
Expand Down

0 comments on commit 5752f96

Please sign in to comment.