Better document workflow existing custom field test
This commit is contained in:
parent
17c2dfa5bf
commit
35e81a2845
@ -999,6 +999,14 @@ class TestWorkflows(DirectoriesMixin, FileSystemAssertsMixin, APITestCase):
|
||||
self.assertEqual(doc.custom_fields.all().count(), 1)
|
||||
|
||||
def test_document_updated_workflow_existing_custom_field(self):
|
||||
"""
|
||||
GIVEN:
|
||||
- Existing workflow with UPDATED trigger and action that adds a custom field
|
||||
WHEN:
|
||||
- Document is updated that already contains the field
|
||||
THEN:
|
||||
- Document update succeeds without trying to re-create the field
|
||||
"""
|
||||
trigger = WorkflowTrigger.objects.create(
|
||||
type=WorkflowTrigger.WorkflowTriggerType.DOCUMENT_UPDATED,
|
||||
filter_has_document_type=self.dt,
|
||||
|
Loading…
x
Reference in New Issue
Block a user