Replies: 1 comment 1 reply
-
|
Hi, Your code looks good. The unit test support for routes won't go that deep (inside pac4j module or any other module), it basically give you access to the final handler on pipeline (your business handler). If that isn't enough you will have to go with integration tests. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
We are writing unit tests to make sure our secure endpoints are properly secured. We have a test that looks something like this:
And we have a test route:
When we run the app normally and send a request to this route, we see the word
VALIDATEin stdout. However, whenwe run the unit test, we don't get anything. We DO see the headers printed in the
getUsernamemethod in both cases.Is the Pac4jModule supposed to work in a unit test context? Or should we switch to integration testing? Or is there some other setup we're missing?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions