Skip to content

How do I test a handler with a macro? #1776

Answered by robjtede
ttfkam asked this question in Q&A
Discussion options

You must be logged in to vote

You can either use manual routing or something like #[cfg_attr(not(test), get("/"))] to conditionally wrap.

Edit: alternative is using test::init_service.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ttfkam
Comment options

@robjtede
Comment options

Answer selected by robjtede
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants