Commit f8c84cfe authored by Ivan Tyagov's avatar Ivan Tyagov

Test that merging docs does work.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38801 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cf31141e
......@@ -2153,8 +2153,6 @@ return 1
request = get_request()
portal = self.portal
# contribute a document, then make it not editable and check we can not contribute to it
filename = 'TEST-en-002.doc'
file = makeFileUpload(filename)
upload_file = makeFileUpload('TEST-en-002.doc')
kw = dict(file=upload_file, \
synchronous_metadata_discovery=True)
......@@ -2170,6 +2168,27 @@ return 1
kw.pop('portal_type')
self.assertRaises(Unauthorized, self.portal.Base_contribute, **kw)
def test_ContributeWithMergingToExistingDocument(self):
"""
Test various cases of merging to an existing document
"""
request = get_request()
portal = self.portal
# contribute a document, then make it not editable and check we can not contribute to it
kw=dict(synchronous_metadata_discovery=True)
upload_file = makeFileUpload('TEST-en-002.doc')
kw = dict(file=upload_file, synchronous_metadata_discovery=True)
document = self.portal.Base_contribute(**kw)
self.stepTic()
upload_file = makeFileUpload('TEST-en-003.odp', 'TEST-en-002.doc')
kw = dict(file=upload_file, synchronous_metadata_discovery=True)
document = self.portal.Base_contribute(**kw)
self.stepTic()
self.assertEquals('test-en-003-description', document.getDescription())
self.assertEquals('test-en-003-title', document.getTitle())
self.assertEquals('test-en-003-keywords', document.getSubject())
class TestDocumentWithSecurity(TestDocumentMixin):
......
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