Skip to content

Commit c0535c5

Browse files
committed
GRAILS-11530 add test
1 parent 3852456 commit c0535c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

grails-test-suite-web/src/test/groovy/org/codehaus/groovy/grails/web/converters/JSONConverterTests.groovy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@ class JSONConverterTests extends AbstractGrailsControllerTests {
132132

133133
assertEquals('{"line":"first line \\n second line"}', result.toString())
134134
}
135+
136+
// GRAILS-11530
137+
void testMoreStringsWithQuotes() {
138+
def str = 'Hi, this is my "test"'
139+
def json = new grails.converters.JSON([a:str])
140+
assertEquals('{"a":"Hi, this is my \\"test\\""}', json.toString())
141+
}
135142

136143
void onSetUp() {
137144
GroovySystem.metaClassRegistry.removeMetaClass Errors

0 commit comments

Comments
 (0)