spec/graphql/language/transform_spec.rb in graphql-0.10.7 vs spec/graphql/language/transform_spec.rb in graphql-0.10.8
- old
+ new
@@ -22,10 +22,11 @@
name, favorite_food,
...personInfo
someStuff(vars: [1,2,3])
someOtherStuff(input: {ints: [1,2,3]})
someEmptyStuff(emptyObj: {}, emptySpaceObj: { })
+ evenMoreStuff(arg: [[1]])
}
}
# assign fragments:
fragment personInfo on Person {
@@ -140,7 +141,12 @@
end
it 'transforms unnamed operations' do
assert_equal(1, get_result("query { me }").parts.length)
assert_equal(1, get_result("mutation { touch }").parts.length)
+ end
+
+ it 'transforms escaped characters' do
+ res = get_result("{quoted: \"\\\" \\\\ \\/ \\b \\f \\n \\r \\t\"}", parse: :value_input_object)
+ assert_equal("\" \\ / \b \f \n \r \t", res.pairs[0].value)
end
end