ruthst00 commented on code in PR #16492:
URL: https://github.com/apache/grails-core/pull/16492#discussion_r4174764957


##########
grails-test-examples/views-functional-tests/src/integration-test/groovy/functional/tests/ModelInterceptorIntSpec.groovy:
##########
@@ -75,4 +75,28 @@ class ModelInterceptorIntSpec extends Specification 
implements HttpClientSupport
         and: "the interceptor's after() received the model argument without 
the bean"
         modelInterceptor.latestModel == [title: 'x']
     }
+
+    @Issue('https://github.com/apache/grails-core/issues/12081')
+    void "TEMPLATE_MODEL does not leak into the interceptor of a forwarded 
action"() {
+        given: "a controller that renders a template (setting TEMPLATE_MODEL) 
then forwards to another action"
+        def response = http('/renderTemplate/forwardAfterTemplate')
+
+        expect: "the HTTP response succeeds"
+        response.assertStatus(200)
+
+        and: "the interceptor's after() for the forwarded action 
(forwardTarget) sees no model"
+        modelInterceptor.latestModel == null

Review Comment:
   Closed test gap



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to