Skip to content
Browse files

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

  • Loading branch information...
1 parent 727399e commit cdb25a5e09dff0d62ca68d19fb4136728910f553 @jwagenleitner jwagenleitner committed
View
13 .../kitchen_sink_app/grails-app/controllers/contentnegotation/RequestFormatController.groovy
@@ -16,4 +16,15 @@ class RequestFormatController {
}
}
}
-}
+
+ def testWithFormatGRAILS8341 = {
+ withFormat {
+ json {
+ render "request format json"
+ }
+ xml {
+ render "request format xml"
+ }
+ }
+ }
+}
View
8 ...chen_sink_app/test/functional/contentnegotiation/ContentNegotiationFunctionalTests.groovy
@@ -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.
Something went wrong with that request. Please try again.