From 5269c75319d4b647c9a30cd2cf8f4e51eb2ead2c Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Sun, 24 Sep 2023 10:25:22 +0300 Subject: [PATCH] test: Increase test coverage --- src/actions/index.test.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/actions/index.test.js 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', + }, + }, + }); + }); +});