Skip to content

Add contract test: set_delegate() called twice overwrites the previous delegate #655

Description

@Austinaminu2

Description

No existing test in `contracts/streaming/src/test.rs` verifies that calling `set_delegate()` a second time replaces the previously-registered delegate (i.e. the old delegate can no longer withdraw after being overwritten).

Task

Add a test that sets a delegate, sets a different delegate, and asserts `get_delegate()` returns the second address (and that the first delegate's authorization is no longer valid).

Good for contributors because

Small, focused addition to the existing delegate test suite in `test.rs`.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions