Skip to content

[contract] Add 3 Tests to config_tests.rsΒ #523

@Olowodarey

Description

@Olowodarey

πŸ“‹ Overview

Expand test coverage for the config module by adding 3 new tests.

βœ… Tasks

  • Add 3 new test functions to contract/tests/config_tests.rs
  • Follow existing test patterns and helper functions
  • Verify all tests pass

πŸ§ͺ New Tests (3 total)

Test 1: Pause and Unpause Contract

#[test]
fn test_pause_and_unpause_contract() {
    // Initialize contract
    // Pause contract
    // Verify operations fail
    // Unpause contract
    // Verify operations succeed
}

Test 2: Update Platform Fee

#[test]
fn test_update_platform_fee() {
    // Initialize contract with fee
    // Update platform fee
    // Verify new fee is applied
}

Test 3: Config Access Control

#[test]
fn test_config_update_unauthorized() {
    // Try to update config as non-admin
    // Should fail with authorization error
}

πŸ” Verification

  • All 3 tests written
  • All tests pass
  • Tests follow existing patterns
  • No clippy warnings

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions