Skip to content

Commit 9375ea8

Browse files
committed
add a test for #721
1 parent 2f191df commit 9375ea8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/webserver/database/sql_to_json.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ mod tests {
181181
'13:14:15'::TIME as time,
182182
'2024-03-14 13:14:15'::TIMESTAMP as timestamp,
183183
'2024-03-14 13:14:15+02:00'::TIMESTAMPTZ as timestamptz,
184-
INTERVAL '1 day' as interval,
184+
INTERVAL '1 year 2 months 3 days' as complex_interval,
185+
INTERVAL '4 hours' as hour_interval,
186+
INTERVAL '1.5 days' as fractional_interval,
185187
'{\"key\": \"value\"}'::JSON as json,
186188
'{\"key\": \"value\"}'::JSONB as jsonb",
187189
)
@@ -201,7 +203,9 @@ mod tests {
201203
"time": "13:14:15",
202204
"timestamp": "2024-03-14T13:14:15+00:00",
203205
"timestamptz": "2024-03-14T11:14:15+00:00",
204-
"interval": "1 day",
206+
"complex_interval": "1 year 2 mons 3 days",
207+
"hour_interval": "04:00:00",
208+
"fractional_interval": "1 day 12:00:00",
205209
"json": {"key": "value"},
206210
"jsonb": {"key": "value"},
207211
}),

0 commit comments

Comments
 (0)