Background
invite::generate_invite_code (src/invite.rs) should not allow generating
invite codes for public markets (is_public: true) since those accept everyone.
There is no test in tests/invite_tests.rs that verifies this guard.
Goal
Add a test confirming public-market invite rejection and a companion test for a
private market.
Tasks
- Create a market with
is_public: true; call generate_invite_code; assert
- Create a market with
is_public: false; call generate_invite_code; assert
Acceptance Criteria
- Public market invite generation is rejected.
- Private market invite generation succeeds.
Files
contracts/open-market/tests/invite_tests.rs.
Background
invite::generate_invite_code(src/invite.rs) should not allow generatinginvite codes for public markets (
is_public: true) since those accept everyone.There is no test in
tests/invite_tests.rsthat verifies this guard.Goal
Add a test confirming public-market invite rejection and a companion test for a
private market.
Tasks
is_public: true; callgenerate_invite_code; assertis_public: false; callgenerate_invite_code; assertAcceptance Criteria
Files
contracts/open-market/tests/invite_tests.rs.