From 4b51aa0b9909f8a58193917f889ffde35f251706 Mon Sep 17 00:00:00 2001 From: Pierre Bastianelli Date: Tue, 1 Mar 2022 16:30:22 -0800 Subject: [PATCH] fix: case in test and import function --- .../import_swrs_operators_from_fdw.sql | 10 ++++----- .../import_swrs_operators_test.sql | 22 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/schema/deploy/util_functions/import_swrs_operators_from_fdw.sql b/schema/deploy/util_functions/import_swrs_operators_from_fdw.sql index 021936179a..3aa6170892 100644 --- a/schema/deploy/util_functions/import_swrs_operators_from_fdw.sql +++ b/schema/deploy/util_functions/import_swrs_operators_from_fdw.sql @@ -72,11 +72,11 @@ begin ) ( select format('{ - "swrs_organisation_id": %%s, - "swrs_legal_name": "%%s", - "swrs_trade_name": "%%s", - "legal_name": "%%s", - "trade_name": "%%s" + "swrsOrganisationId": %%s, + "swrsLegalName": "%%s", + "swrsTradeName": "%%s", + "legalName": "%%s", + "tradeName": "%%s" }', operators_to_insert.swrs_organisation_id, operators_to_insert.swrs_legal_name, diff --git a/schema/test/unit/util_functions/import_swrs_operators_test.sql b/schema/test/unit/util_functions/import_swrs_operators_test.sql index 9f03682943..ccfc258317 100644 --- a/schema/test/unit/util_functions/import_swrs_operators_test.sql +++ b/schema/test/unit/util_functions/import_swrs_operators_test.sql @@ -48,7 +48,7 @@ select is_empty( select results_eq( $$ select - (new_form_data->'swrs_organisation_id')::int, + (new_form_data->'swrsOrganisationId')::int, operation::text, change_reason::text, change_status::text @@ -81,11 +81,11 @@ select results_eq( select results_eq( $$ select - (new_form_data->'swrs_organisation_id')::int, - new_form_data->>'swrs_trade_name', - new_form_data->>'swrs_legal_name', - new_form_data->>'trade_name', - new_form_data->>'legal_name', + (new_form_data->'swrsOrganisationId')::int, + new_form_data->>'swrsTradeName', + new_form_data->>'swrsLegalName', + new_form_data->>'tradeName', + new_form_data->>'legalName', operation::text, change_reason::text from cif.form_change where form_data_table_name='operator' @@ -131,11 +131,11 @@ drop server test_swrs_server cascade; select results_eq( $$ select - (new_form_data->'swrs_organisation_id')::int, - new_form_data->>'swrs_trade_name', - new_form_data->>'swrs_legal_name', - new_form_data->>'trade_name', - new_form_data->>'legal_name', + (new_form_data->'swrsOrganisationId')::int, + new_form_data->>'swrsTradeName', + new_form_data->>'swrsLegalName', + new_form_data->>'tradeName', + new_form_data->>'legalName', operation::text, change_reason::text, change_status::text