Commit 7cef58c5 authored by Xiaowu Zhang's avatar Xiaowu Zhang

fix can't delete embedded file

See merge request !1781
parents 18deb716 a6f74a19
...@@ -12,6 +12,21 @@ ...@@ -12,6 +12,21 @@
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/portal_workflow/embedded_workflow/transition_delete</string>
<string>destination/portal_workflow/embedded_workflow/transition_delete_action</string>
</tuple>
</value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>This document is embedded (i.e. acquire its security from container)</string> </value> <value> <string>This document is embedded (i.e. acquire its security from container)</string> </value>
......
...@@ -1533,6 +1533,16 @@ class TestERP5Base(ERP5TypeTestCase): ...@@ -1533,6 +1533,16 @@ class TestERP5Base(ERP5TypeTestCase):
self.assertEqual('text/xml', embedded_file.getContentType()) self.assertEqual('text/xml', embedded_file.getContentType())
self.assertEqual('text/xml', embedded_file.getProperty('content_type')) self.assertEqual('text/xml', embedded_file.getProperty('content_type'))
def test_EmbeddedFile_workflow(self):
embedded_file = self.portal.person_module.newContent(
portal_type='Person'
).newContent(
portal_type='Embedded File'
)
self.assertEqual('embedded', embedded_file.getValidationState())
self.portal.portal_workflow.doActionFor(embedded_file, 'delete_action')
self.assertEqual('deleted', embedded_file.getValidationState())
def test_BankAccount_validateIBAN(self): def test_BankAccount_validateIBAN(self):
self.assertTrue( self.assertTrue(
self.portal.BankAccount_validateIBAN( self.portal.BankAccount_validateIBAN(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment