Implement document workflows transition ACLs. GitLab issue #321.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-02-20 02:37:42 -04:00
parent 9942da601e
commit 6e1cf57079
11 changed files with 336 additions and 89 deletions
@@ -186,6 +186,19 @@ class WorkflowAPITestCase(APITestCase):
workflow.refresh_from_db()
self.assertEqual(workflow.label, TEST_WORKFLOW_LABEL_EDITED)
def test_document_type_workflow_list(self):
workflow = self._create_workflow()
workflow.document_types.add(self.document_type)
response = self.client.get(
reverse(
'rest_api:documenttype-workflow-list',
args=(self.document_type.pk,)
),
)
self.assertEqual(response.data['results'][0]['label'], workflow.label)
@override_settings(OCR_AUTO_OCR=False)
class WorkflowStatesAPITestCase(APITestCase):