test: expose missing trait bounds for Json<Vec<x>>

This commit is contained in:
Peter Maatman 2020-06-09 21:48:38 +02:00 committed by Ryan Leckey
parent 8b4ef3f0b8
commit 90242494a8

View file

@ -141,4 +141,14 @@ mod json_tests {
"SELECT CAST({0} AS BINARY) <=> CAST(? AS BINARY), CAST({0} AS BINARY) as _2, ? as _3",
"\'{\"name\":\"Joe\",\"age\":33}\'" == Json(Friend { name: "Joe".to_string(), age: 33 })
));
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
struct Customer {
json_column: Json<Vec<i64>>,
}
test_type!(json_struct_json_column<Json<Customer>>(
MySql,
"\'{ \"json_column\": [1, 2] }\'" == Json(Customer { json_column: Json(vec![1, 2]) })
));
}