Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C4GT] Chain-Space: Add tests for DelegateAlreadyAdded #282

Closed
3 tasks done
vatsa287 opened this issue Feb 5, 2024 · 0 comments · Fixed by #325
Closed
3 tasks done

[C4GT] Chain-Space: Add tests for DelegateAlreadyAdded #282

vatsa287 opened this issue Feb 5, 2024 · 0 comments · Fixed by #325
Labels

Comments

@vatsa287
Copy link
Member

vatsa287 commented Feb 5, 2024

Description

Subtask under : cord-network/community#7

New testcase can be tested under cargo test -p pallet-chain-space after adding it in the code.

Goals

  • Add tests for DelegateAlreadyAdded for pallet/chain-space

Expected Outcome

  • Test should assert for DelegateAlreadyAdded being returned properly in all the possible calls.
  • If there are more than one function returning this error code, all of them should be validated either as one test case or as multiple test cases.

Acceptance Criteria

NA

Implementation Details

Look at other test cases, and add a test case for the same.
Ex: creating_a_duplicate_space_should_fail which validates error code SpaceAlreadyAnchored

Mockups / Wireframes

NA


Product Name

CORD

Organization Name

Dhiway

Domain

Blockchain

Tech Skills Needed

Rust

Mentor(s)

@amarts

Complexity

[Low]

Category

[Test]

Sub Category

[Beginner friendly]

@amarts amarts added the good first issue Good for newcomers label Feb 6, 2024
vatsa287 added a commit to vatsa287/cord that referenced this issue Feb 9, 2024
This PR adds tests to check error code `DelegateAlreadyAdded`.
This error code is checked for methods
- add_delegate
- add_delegator
- add_admin_delegate
all of which calls `space_delegate_addition` from where this error code originates.

Fixes: dhiway#282
Signed-off-by: Shreeevatsa N <vatsa@dhiway.com>
amarts pushed a commit that referenced this issue Feb 13, 2024
This PR adds tests to check error code `DelegateAlreadyAdded`.
This error code is checked for methods
- add_delegate
- add_delegator
- add_admin_delegate

all of which calls `space_delegate_addition` from where this error code originates.

Fixes: #282
Signed-off-by: Shreeevatsa N <vatsa@dhiway.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants