diff --git a/src/actions/index.test.js b/src/actions/index.test.js new file mode 100644 index 0000000..8ae873b --- /dev/null +++ b/src/actions/index.test.js @@ -0,0 +1,19 @@ +import { getWorkflowProgress } from './index'; + +describe('getWorkflowProgress', () => { + const item = 'https://demo.plone.org'; + + it('returns the correct action object', () => { + const action = getWorkflowProgress(item); + expect(action).toEqual({ + type: 'WORKFLOW_PROGRESS', + request: { + op: 'get', + path: `${item}/@workflow.progress`, + headers: { + Accept: 'application/json', + }, + }, + }); + }); +});