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
- Create a market; attempt
close_market from a random third-party address;
- Call
close_market from the market creator; assert success
- 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.
Background
market::close_marketshould only be callable by the market creator or theadmin. 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.rsfor the authorization paths.Tasks
close_marketfrom a random third-party address;close_marketfrom the market creator; assert successclose_marketfrom the admin on a different market (not created byAcceptance Criteria
Files
contracts/open-market/tests/market_tests.rs.