Skip to content

MockDripsContract is defined independently in two test files #199

Description

@N-i-xx

Problem

tests/purge_reward_stream.rs and tests/test.rs each independently declare their own #[contract] pub struct MockDripsContract with an identical start_stream stub, instead of sharing one implementation.

Why it matters

Any change to the mocked Drips interface (e.g. a new method needed for a future test) has to be made in two separate mock definitions, and there's no guarantee the two stay behaviorally identical over time.

Suggested fix

Move MockDripsContract into a shared test-support location (e.g. tests/common/mod.rs) and have both test files import it instead of redefining it.

Acceptance criteria

  • MockDripsContract is defined once and reused by both test files
  • Both test suites still pass unchanged

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26good first issueGood for newcomerstestingTest coverage improvements

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions