Skip to content

Commit a74bf4c

Browse files
committed
Test for #10308
1 parent 4cc2810 commit a74bf4c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

grails-web-url-mappings/src/test/groovy/grails/web/mapping/GroupedUrlMappingSpec.groovy

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,30 @@ import javax.servlet.http.HttpServletResponse
2727
*/
2828
class GroupedUrlMappingSpec extends AbstractUrlMappingsSpec {
2929

30+
@Issue('#10308')
31+
void "Test mapping with group and nested collection"() {
32+
given:
33+
def linkGenerator = getLinkGenerator {
34+
"/foos"(resources: 'foo') {
35+
collection {
36+
'/baz'(controller: 'foo', action: 'baz')
37+
}
38+
}
39+
40+
group "/g", {
41+
"/bars"(resources: 'bar') {
42+
collection {
43+
'/baz'(controller: 'bar', action: 'baz')
44+
}
45+
}
46+
}
47+
}
48+
49+
expect:
50+
linkGenerator.link(controller:'bar', action:'baz', params:[barId:1]) == 'http://localhost/g/bars/1/baz'
51+
}
52+
53+
3054
@Issue('#9417')
3155
void "Test that redirects to grouped resource mappings work when the method is specified"() {
3256
given:

0 commit comments

Comments
 (0)