How to test session attribute set in Interceptor

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to test session attribute set in Interceptor

Niels Jørgen Bagger
I have a simple Interceptor that intercepts all requests:

package proxy.interceptors

import grails.util.Holders
import proxy.Principal

class ProxyInterceptor {


ProxyInterceptor() {

boolean before() {
Principal principal = new Principal(Holders.config, request)
request.session.principal = principal

return true


How do a write a test, that tests that principal is actually set on the session?

You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit
For more options, visit