Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InterceptorUnitTest does not set params #40

Open
sbglasius opened this issue Aug 23, 2018 · 1 comment
Open

InterceptorUnitTest does not set params #40

sbglasius opened this issue Aug 23, 2018 · 1 comment

Comments

@sbglasius
Copy link
Contributor

sbglasius commented Aug 23, 2018

With an interceptor like this:

class ActionNameInterceptor {
    boolean before() {
        println "$controllerName $actionName $params"
        if(params.test == 'is set') {
            request.setAttribute('paramSet', 'param set')
        }
        return true
    }
}

When running, the params is set, but when running tests, the params is not set.

See https://github.com/sbglasius/grailsInterceptorBugs interceptorbug.ActionNameInterceptorSpec#Test interceptor params should be set

@sbglasius
Copy link
Contributor Author

I will attempt a PR with the fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant