From 90242494a82f65253a47f640db0db8eec90ed26f Mon Sep 17 00:00:00 2001 From: Peter Maatman Date: Tue, 9 Jun 2020 21:48:38 +0200 Subject: [PATCH] test: expose missing trait bounds for Json> --- tests/mysql/types.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/mysql/types.rs b/tests/mysql/types.rs index cc6d83a7..5d8f4b69 100644 --- a/tests/mysql/types.rs +++ b/tests/mysql/types.rs @@ -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>, + } + + test_type!(json_struct_json_column>( + MySql, + "\'{ \"json_column\": [1, 2] }\'" == Json(Customer { json_column: Json(vec![1, 2]) }) + )); }