Skip to content

Commit b55d2cc

Browse files
Brian Savillejeffscottbrown
authored andcommitted
Add unit tests for GRAILS-9110
1 parent f07fdf1 commit b55d2cc

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

grails-test-suite-uber/src/test/groovy/grails/test/mixin/UrlMappingsTestMixinTests.groovy

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,24 @@ class UrlMappingsTestMixinTests {
137137
}
138138
}
139139
}
140+
141+
@Test
142+
voide testGrails9110() {
143+
mockController(UserController)
144+
mockUrlMappings(GRAILS9110UrlMappings)
145+
shouldfail(ComparisonFailure) {
146+
assertForwardUrlMapping("/user", controller:"user", action:"publicProfile") {
147+
param1 = "true"
148+
}
149+
}
150+
assertForwardUrlMapping("/user", controller:"user", action:"publicProfile") {
151+
boolParam = true
152+
strParam = "string"
153+
numParam = 123
154+
objParam = [test:true]
155+
dateParam = new Date(1)
156+
}
157+
}
140158
}
141159

142160
class AnotherUrlMappings {
@@ -180,3 +198,14 @@ class GRAILS5222UrlMappings {
180198
}
181199
}
182200
}
201+
202+
class GRAILS9110UrlMappings {
203+
static mappings = {
204+
"/user"(controller:"user", action:"publicProfile") {
205+
boolParam = true
206+
strParam = "string"
207+
numParam = 123
208+
dateParam = new Date(1)
209+
}
210+
}
211+
}

0 commit comments

Comments
 (0)