File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
grails-plugin-testing/src/main/groovy/grails/test/mixin/web
grails-test-suite-uber/src/test/groovy/grails/test/mixin Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import org.codehaus.groovy.grails.commons.GrailsTagLibClass
2323import org.codehaus.groovy.grails.commons.TagLibArtefactHandler
2424import org.codehaus.groovy.grails.commons.metaclass.MetaClassEnhancer
2525import org.codehaus.groovy.grails.plugins.web.api.TagLibraryApi
26+ import org.codehaus.groovy.grails.web.pages.GroovyPageRequestBinding
2627import org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine
2728import org.codehaus.groovy.grails.web.pages.TagLibraryLookup
2829import org.codehaus.groovy.grails.web.plugins.support.WebMetaUtils ;
@@ -60,7 +61,7 @@ class GroovyPageUnitTestMixin extends ControllerUnitTestMixin {
6061 @Before
6162 void bindGrailsWebRequest () {
6263 super . bindGrailsWebRequest()
63- pageScope = new GroovyPageBinding ()
64+ pageScope = new GroovyPageBinding (new GroovyPageRequestBinding (webRequest) )
6465 request. setAttribute(GrailsApplicationAttributes . PAGE_SCOPE , pageScope)
6566
6667 }
Original file line number Diff line number Diff line change @@ -10,9 +10,16 @@ import org.junit.Test
1010@TestFor (MyController )
1111class ControllerAndGroovyPageMixinTests {
1212
13- // verifies the above 2 mixins can operator together without error
13+ // GRAILS-9718
1414 @Test
1515 void testController () {
1616 controller != null
17+
18+ views[' /foo/_bar.gsp' ] = ' Id: ${params.id}'
19+
20+ params. id = 10
21+ def content = render(template :" /foo/bar" )
22+
23+ assert content == ' Id: 10'
1724 }
1825}
You can’t perform that action at this time.
0 commit comments