Skip to content

Commit

Permalink
Merge branch 'master' of github.com:grails/grails-core
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed May 18, 2012
2 parents ab75b5c + f8a5262 commit 85604aa
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class UrlMappingsUnitTestMixin extends ControllerUnitTestMixin {
paramAssertions.resolveStrategy = Closure.DELEGATE_ONLY paramAssertions.resolveStrategy = Closure.DELEGATE_ONLY
paramAssertions.call() paramAssertions.call()
params.each {name, value -> params.each {name, value ->
assertEquals("Url mapping '$name' parameter assertion for '$url' failed", value.toString(), mapping.params[name]) assertEquals("Url mapping '$name' parameter assertion for '$url' failed", value, mapping.params[name])
} }
} }
return true return true
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -137,6 +137,24 @@ class UrlMappingsTestMixinTests {
} }
} }
} }

@Test
void testGrails9110() {
mockController(UserController)
mockUrlMappings(GRAILS9110UrlMappings)
shouldFail(ComparisonFailure) {
assertForwardUrlMapping("/user", controller:"user", action:"publicProfile") {
param1 = "true"
}
}
assertForwardUrlMapping("/user", controller:"user", action:"publicProfile") {
boolParam = true
strParam = "string"
numParam = 123
objParam = [test:true]
dateParam = new Date(1)
}
}
} }


class AnotherUrlMappings { class AnotherUrlMappings {
Expand Down Expand Up @@ -180,3 +198,15 @@ class GRAILS5222UrlMappings {
} }
} }
} }

class GRAILS9110UrlMappings {
static mappings = {
"/user"(controller:"user", action:"publicProfile") {
boolParam = true
strParam = "string"
numParam = 123
objParam = [test:true]
dateParam = new Date(1)
}
}
}

0 comments on commit 85604aa

Please sign in to comment.