Hi, I'm trying to migrate some Ktor 1 tests using ...
# ktor
m
Hi, I'm trying to migrate some Ktor 1 tests using withTestApplicataion to the new Ktor 2 testApplication API. I have tests that ensure that a session was created for the request, and I used to do that by simply calling
call.sessions.get<MySessionClass>()
using the withTestApplication API. Is there a way to do this with the testApplication API?
a
You can check that the client receives the
Set-Cookie
header in the response.
m
My sessions do not use cookies and use headers instead, but I guess that could work, thank you. It's still more annoying than the option from Ktor 1 imo.