Skip to content

test: add backend validation test for invalid channel names #92

Description

@zoorpha

Context

Channel creation accepts a name parameter, but edge cases (empty string, only spaces, special characters, extremely long names) may not be fully validated or tested.

Expected change

Add one or more integration tests in backend/tests/ that verify the API rejects invalid channel names with appropriate error responses.

Suggested files

  • backend/tests/channels_test.rs (or create a new test file)
  • backend/src/services/channel.rs (to inspect current validation logic)

Acceptance criteria

  • Test for empty channel name returns 400
  • Test for channel name exceeding max length returns 400
  • Test for channel name with invalid characters returns 400
  • Tests run with cargo test --lib and pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/backendRust backend codegood-first-issueSmall, well-defined tasks for new contributorshelp wantedExtra attention is neededrisk/standardStandard tier: typos, UI polish, test additions, internal refactors

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions