Skip to content

Add contract test: group full scenario#118

Open
WuXieSec wants to merge 1 commit intosorosave-protocol:mainfrom
WuXieSec:test/add-group-full-test
Open

Add contract test: group full scenario#118
WuXieSec wants to merge 1 commit intosorosave-protocol:mainfrom
WuXieSec:test/add-group-full-test

Conversation

@WuXieSec
Copy link
Copy Markdown

This PR adds tests for the group full scenario, as requested in #27.

Changes:

  • Test group with max_members=2
  • Fill with 2 members
  • Attempt to add 3rd member
  • Verify GroupFull error
  • Add additional tests for at-capacity and not-full scenarios

Why this matters:
These tests ensure:

  • The max_members limit is properly enforced
  • The correct error is returned when attempting to join a full group
  • Groups can reach capacity without issues
  • Groups with available slots accept new members

Test coverage:

  • ❌ Join full group (2/2 members) → GroupFull
  • ✅ Fill group to exact capacity (3/3 members)
  • ✅ Join group with available slots (3/5 members)

Closes #27

Changes:
- Test group with max_members=2
- Fill with 2 members
- Attempt to add 3rd member
- Verify GroupFull error
- Add additional tests for at-capacity and not-full scenarios

These tests ensure the max_members limit is properly
enforced and the correct error is returned when full.

Closes sorosave-protocol#27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add contract test: group full scenario

1 participant