From 96cc4e6a07cab8b4ade546895c63cc95d1200916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Thu, 30 Jun 2011 15:56:50 +0200 Subject: [PATCH] Check that assignment reset bug is fixed. --- product/ERP5/tests/testERP5Credential.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/product/ERP5/tests/testERP5Credential.py b/product/ERP5/tests/testERP5Credential.py index 846bacc164..88b19981c3 100644 --- a/product/ERP5/tests/testERP5Credential.py +++ b/product/ERP5/tests/testERP5Credential.py @@ -1017,6 +1017,28 @@ class TestERP5Credential(ERP5TypeTestCase): sequence_list.addSequenceString(sequence_string) sequence_list.play(self) + def test_no_reset_assignment_ERP5Site_newCredentialUpdate(self): + """Checks that assignments are left intact after credential update""" + reference = self.id() + person = self.portal.person_module.newContent(portal_type='Person', + reference=reference, + password='secret', + role='internal') + assignment = person.newContent(portal_type='Assignment', function='manager') + assignment.open() + transaction.commit() + credential_update = self.portal.credential_update_module.newContent( + portal_type='Credential Update', + first_name='Some Name', + destination_decision_value=person + ) + credential_update.submit() + credential_update.accept() + self.tic() + + self.assertEqual('Some Name', person.getFirstName()) + self.assertEqual('manager', assignment.getFunction()) + def test_checkCredentialQuestionIsNotCaseSensitive(self): ''' check that if the user enter an answer with a diffent case, this will still -- 2.30.9