Skip to content

[Contract] — Test: generate_invite_code on a public market returns an error #1054

Description

@Olowodarey

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

  1. Create a market with is_public: true; call generate_invite_code; assert
  2. 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.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions