Skip to content

Commit

Permalink
Update incomplete session test
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnaab committed Oct 15, 2024
1 parent edc2d29 commit 5dd7b8d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/forms/src/services/submit-form.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('submitForm', () => {
});
});

it.fails('fails with incomplete session', async () => {
it('succeeds with incomplete session', async () => {
const { ctx, form, id } = await setupTestForm(createOnePatternTestForm());
const session = createFormSession(form);
const formSessionResult = await ctx.repository.upsertFormSession({
Expand All @@ -74,8 +74,14 @@ describe('submitForm', () => {
}
const result = await submitForm(ctx, formSessionResult.data.id, id, {});
expect(result).toEqual({
success: false,
error: 'Session is not complete',
data: {
sessionId: formSessionResult.data.id,
session: {
...session,
route: undefined,
},
},
success: true,
});
});

Expand Down

0 comments on commit 5dd7b8d

Please sign in to comment.