Skip to content

Commit

Permalink
✏️ Improve wording
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov authored and alexgrozav committed Jun 22, 2022
1 parent f40ae8a commit a9c8cb4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/cli/test/integration/workflows.api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test('POST /workflows should store pin data for node in workflow', async () => {
expect(JSON.parse(pinData)).toMatchObject({ Spotify: { myKey: 'myValue' } });
});

test('POST /workflows without pin data should store pin data as null', async () => {
test('POST /workflows should set pin data to null if no pin data', async () => {
const ownerShell = await testDb.createUserShell(globalOwnerRole);
const authOwnerAgent = utils.createAgent(app, { auth: true, user: ownerShell });

Expand All @@ -64,19 +64,19 @@ test('POST /workflows without pin data should store pin data as null', async ()
expect(pinData).toBeNull();
});

test('GET /workflows/:id should retrieve a workflow - node with pin data', async () => {
test('GET /workflows/:id should return pin data at node level', async () => {
const ownerShell = await testDb.createUserShell(globalOwnerRole);
const authOwnerAgent = utils.createAgent(app, { auth: true, user: ownerShell });

const workflow1 = makeWorkflow({ withPinData: true });
const workflow = makeWorkflow({ withPinData: true });

await authOwnerAgent.post('/workflows').send(workflow1);
await authOwnerAgent.post('/workflows').send(workflow);

const response1 = await authOwnerAgent.get('/workflows/1');
const response = await authOwnerAgent.get('/workflows/1');

expect(response1.statusCode).toBe(200);
expect(response.statusCode).toBe(200);

const { nodes } = response1.body.data as { nodes: INode[] };
const { nodes } = response.body.data as { nodes: INode[] };

const node = nodes.find((node) => node.name === 'Spotify');

Expand Down

0 comments on commit a9c8cb4

Please sign in to comment.