File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,7 @@ class MockUtils {
203203
204204 modelAndView. viewName = map[" view" ]
205205 modelAndView. addAllObjects(map[" model" ])
206+ return map[" model" ] // backwards compatibility for GRAILS-7022 - shouldn't ordinarily be referenced, use renderArgs instead
206207 }
207208 else if (map[" text" ] != null ) {
208209 delegate. response. outputStream << map[" text" ]
Original file line number Diff line number Diff line change @@ -758,6 +758,18 @@ class MockUtilsTests extends GroovyTestCase {
758758 assertEquals (101 , controller. modelAndView. model. count)
759759 }
760760
761+ /**
762+ * Test for GRAILS-7022
763+ */
764+ void testGRAILS7022 () {
765+ MockUtils . mockController(TestController )
766+
767+ def controller = new TestController ()
768+
769+ def returnValue = controller. render(view : " list" , model : [count : 101 ])
770+ assertTrue returnValue instanceof Map
771+ }
772+
761773 /**
762774 * Tests that the render method used for templates populates the
763775 * "renderArgs" map with the given values.
You can’t perform that action at this time.
0 commit comments