Skip to content

Commit

Permalink
add test for temporal extent format
Browse files Browse the repository at this point in the history
  • Loading branch information
hrodmn committed Jun 4, 2024
1 parent f4b675d commit b2ec702
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pgstac/tests/basic/crud_functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ SELECT get_setting_bool('update_collection_extent');
SELECT update_item((SELECT content || '{"properties":{"datetime":"2024-01-01 00:00:00Z"}}'::jsonb FROM test_items LIMIT 1));

SELECT content->'extent' FROM collections WHERE id='pgstactest-crudtest';

-- check formatting of temporal extent
SELECT collection_temporal_extent('pgstactest-crudtest');

4 changes: 4 additions & 0 deletions src/pgstac/tests/basic/crud_functions.sql.out
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,7 @@ SELECT update_item((SELECT content || '{"properties":{"datetime":"2024-01-01 00:
SELECT content->'extent' FROM collections WHERE id='pgstactest-crudtest';
{"spatial": {"bbox": [[-85.3792495727539, 30.933948516845703, -85.30819702148438, 31.003555297851562]]}, "temporal": {"interval": [["2023-02-01T00:00:00+00:00", "2023-02-01T00:00:00+00:00"]]}}

-- check formatting of temporal extent
SELECT collection_temporal_extent('pgstactest-crudtest');
[["2023-02-01T00:00:00+00:00", "2024-01-01T00:00:00+00:00"]]

0 comments on commit b2ec702

Please sign in to comment.