Skip to content

[CHA-2758] Add tests for future channel bans without channel CID#247

Closed
nijeesh-stream wants to merge 1 commit intomainfrom
nijeeshjoshy/cha-2758-fcb-without-channel-cid
Closed

[CHA-2758] Add tests for future channel bans without channel CID#247
nijeesh-stream wants to merge 1 commit intomainfrom
nijeeshjoshy/cha-2758-fcb-without-channel-cid

Conversation

@nijeesh-stream
Copy link
Copy Markdown
Contributor

Ticket

Summary

  • Add integration tests for the new backend capability that allows ban_from_future_channels without requiring a channel_cid
  • The Java SDK model already supports this (fields were added in v1.39.0 via [CHA-1703]), and the backend validation was relaxed in chat PR #12582

Tests added

Test Coverage
whenBanFromFutureChannelsWithoutChannelCid_thenSucceeds Creates FCB without channel_cid, verifies record via queryFutureChannelBans, asserts user is NOT globally banned
whenBanFromFutureChannelsWithoutCid_thenAutoAppliedToNewChannels Creates FCB without CID, creates a new channel by the banner with target as member, verifies target is auto-banned in that channel
whenBanFromFutureChannelsWithoutCidAndShadow_thenPreservesShadow Creates shadow FCB without CID, verifies shadow=true is preserved on the FCB record
whenRemovingFutureChannelBanWithoutCid_thenBanIsRemoved Full lifecycle: create FCB, verify exists, remove via unban().removeFutureChannelsBan(true).createdBy(), verify removed
whenBanFromFutureChannelsWithoutCidAndTimeout_thenExpirationSet Creates FCB without CID with timeout(60), verifies expires field is set

Checklist

  • Tests cover the new backend behavior (ban_from_future_channels without channel_cid)
  • Tests mirror scenarios from backend Go tests and QA TypeScript tests
  • All tests include proper cleanup (unban after ban)

Made with Cursor

Add integration tests covering the new backend capability (chat PR #12582)
that allows ban_from_future_channels without requiring a channel_cid.

Tests added:
- Basic FCB creation without channel CID
- Auto-ban applied to new channels created by the banner
- Shadow ban preservation on FCB without CID
- Full lifecycle: create and remove FCB without CID
- Timeout/expiration preserved on FCB without CID

Made-with: Cursor
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.

1 participant