Skip to content

api: add test — GET /assets/:id returns 404 for an unknown asset id #193

Description

@valoryyaa-byte

Type: Test coverage

Location: api/src/routes/assets.rs

What's missing
Assert the status is 404 and the body is the documented error shape, not an empty 200.

How to add it
Use the existing routes::test_support::state_with helper to build an
AppState from a fixed Snapshot, call the handler directly, and assert on
the serialized body. Follow the patterns already in api/tests/api_responses.rs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions