Ktor API test fails to serialize class to HTTP body despite using ContentNegotiation in Kotlin
I am building a server using the Ktor framework in Kotlin. I am currently writing a test for my API route that registers a user, but I keep encountering an error when I attempt to send a JSON body to the server. The error message indicates that serialization fails when trying to serialize the class to the HTTP body.
I followed the Ktor testing documentation and learned that I need to install ContentNegotiation in my test client. However, despite doing this, the error persists.
Here is my...