Permalink
Browse files

GRAILS-8341 - withFormat not working correctly with */*

  • Loading branch information...
jwagenleitner committed Dec 31, 2011
1 parent 727399e commit cdb25a5e09dff0d62ca68d19fb4136728910f553
@@ -16,4 +16,15 @@ class RequestFormatController {
}
}
}
-}
+
+ def testWithFormatGRAILS8341 = {
+ withFormat {
+ json {
+ render "request format json"
+ }
+ xml {
+ render "request format xml"
+ }
+ }
+ }
+}
@@ -7,7 +7,7 @@ class ContentNegotiationFunctionalTests extends functionaltestplugin.FunctionalT
//
get('/requestFormat/testFormat')
assertStatus 200
- assertContentContains 'response format = html'
+ assertContentContains 'response format = all'
get('/requestFormat/testFormat.xml')
assertStatus 200
@@ -24,4 +24,10 @@ class ContentNegotiationFunctionalTests extends functionaltestplugin.FunctionalT
assertStatus 200
assertContentContains 'request format xml'
}
+
+ void testWithFormatGRAILS8341() {
+ get('/requestFormat/testWithFormatGRAILS8341')
+ assertStatus 200
+ assertContentContains 'request format json'
+ }
}

0 comments on commit cdb25a5

Please sign in to comment.