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


##########
grails-web-url-mappings/src/test/groovy/org/grails/web/mapping/mvc/UrlMappingsHandlerMappingSpec.groovy:
##########
@@ -319,4 +403,50 @@ class FooController  {
     def notFound() {
         RequestContextHolder.currentRequestAttributes().response.writer << 
"Not Found"
     }
+
+    /**
+     * Calls render(text:), which sets renderView=false and writes the body. 
The adapter must
+     * return null so DispatcherServlet does not attempt view resolution. 
(#15819)
+     */
+    @Action
+    def renderText() {
+        render(text: 'hello')
+        null
+    }
+
+    /**
+     * Calls render(text:) and also returns a Map — the exact bug scenario 
from #15819 where the
+     * adapter previously ignored renderView=false when result instanceof Map.
+     */
+    @Action
+    def renderTextWithMap() {
+        render(text: 'hello')
+        [foo: 'bar']
+    }
+
+    /**
+     * Simulates render(view: 'myView'): sets MODEL_AND_VIEW on the request 
but does NOT set
+     * renderView=false. The adapter must return the ModelAndView so 
DispatcherServlet resolves
+     * the named view. (#15819)
+     */
+    @Action
+    def renderView() {
+        request.setAttribute(

Review Comment:
   Fixed in 
https://github.com/apache/grails-core/pull/16516/changes/7675410cc74ab8b8fdbddc7dafef56cf5ca6ee83



-- 
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