Skip to content

Integration test/facilities - #63

Open
jobin2005 wants to merge 16 commits into
mainfrom
integration-test/facilities
Open

Integration test/facilities#63
jobin2005 wants to merge 16 commits into
mainfrom
integration-test/facilities

Conversation

@jobin2005

Copy link
Copy Markdown
Collaborator

integration tests for facilities

Comment thread test/integration/facility.test.ts Outdated
maxCapacity: 100,
})
.returning();
assert(venue);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always check

assert( something != null)

fix this same mistake everywhere else

});

// Confirms the repository lacks transaction serializability or unique constraints, permitting duplicates
expect(allAssignments.length).toBeGreaterThan(1);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be equal to 1? or am i missing something?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is actually to check if the race condition is correctly handled.(Multiple people assigning a facility at the same time)

Comment thread test/integration/facility.test.ts Outdated
);
});

test("Unassignment strictly enforces ownership permissions and valid ID bindings", async () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i feel like a better name could be used here

Comment thread test/integration/facility.test.ts Outdated
workflowParticipationPolicy: "include",
overlapPolicy: "shared",
});
await changeAvailabilityDb(facility.id, { availability: true });

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use service functions for changing availabiliity, here the bug should fix that

@jobin2005
jobin2005 force-pushed the integration-test/facilities branch from 0411333 to 2c22d9b Compare August 6, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants