Skip to content

[Contract] — Test: close_market by non-creator and non-admin is rejected #1055

Description

@Olowodarey

Background

market::close_market should only be callable by the market creator or the
admin. The market tests do not include a test for an unauthorized third party
attempting to close a market.

Goal

Add tests in tests/market_tests.rs for the authorization paths.

Tasks

  1. Create a market; attempt close_market from a random third-party address;
  2. Call close_market from the market creator; assert success
  3. Call close_market from the admin on a different market (not created by

Acceptance Criteria

  • Random addresses cannot close markets.
  • Creator and admin can both close.

Files

contracts/open-market/tests/market_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