diff --git a/test/plsql/ud/test_gw_fct_pg2epa_main.sql b/test/plsql/ud/test_gw_fct_pg2epa_main.sql index b4ab6fab2..af3a63120 100644 --- a/test/plsql/ud/test_gw_fct_pg2epa_main.sql +++ b/test/plsql/ud/test_gw_fct_pg2epa_main.sql @@ -16,49 +16,49 @@ SELECT plan(7); -- Extract and test the "status" field from the function's JSON response SELECT is( (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, - "data":{"filterFields":{}, "pageInfo":{}, "resultId":"expl_1", "dumpSubcatch":"False", "step": 1}}$$)::JSON)->>'status', + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 1}}$$)::JSON)->>'status', 'Accepted', 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=1 returns status "Accepted"' ); SELECT is( (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, - "data":{"filterFields":{}, "pageInfo":{}, "resultId":"expl_1", "dumpSubcatch":"False", "step": 2}}$$)::JSON)->>'status', + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 2}}$$)::JSON)->>'status', 'Accepted', 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=2 returns status "Accepted"' ); SELECT is( (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, - "data":{"filterFields":{}, "pageInfo":{}, "resultId":"expl_1", "dumpSubcatch":"False", "step": 3}}$$)::JSON)->>'status', + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 3}}$$)::JSON)->>'status', 'Accepted', 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=3 returns status "Accepted"' ); SELECT is( (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, - "data":{"filterFields":{}, "pageInfo":{}, "resultId":"expl_1", "dumpSubcatch":"False", "step": 4}}$$)::JSON)->>'status', + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 4}}$$)::JSON)->>'status', 'Accepted', 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=4 returns status "Accepted"' ); SELECT is( (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, - "data":{"filterFields":{}, "pageInfo":{}, "resultId":"expl_1", "dumpSubcatch":"False", "step": 5}}$$)::JSON)->>'status', + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 5}}$$)::JSON)->>'status', 'Accepted', 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=5 returns status "Accepted"' ); SELECT is( (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, - "data":{"filterFields":{}, "pageInfo":{}, "resultId":"expl_1", "dumpSubcatch":"False", "step": 6}}$$)::JSON)->>'status', + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 6}}$$)::JSON)->>'status', 'Accepted', 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=6 returns status "Accepted"' ); SELECT is( (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, - "data":{"filterFields":{}, "pageInfo":{}, "resultId":"expl_1", "dumpSubcatch":"False", "step": 7}}$$)::JSON)->>'status', + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 7}}$$)::JSON)->>'status', 'Accepted', 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=7 returns status "Accepted"' ); diff --git a/test/plsql/ws/test_gw_fct_pg2epa_main.sql b/test/plsql/ws/test_gw_fct_pg2epa_main.sql index f19353cf1..dfc30986c 100644 --- a/test/plsql/ws/test_gw_fct_pg2epa_main.sql +++ b/test/plsql/ws/test_gw_fct_pg2epa_main.sql @@ -10,15 +10,57 @@ SET client_min_messages TO WARNING; SET search_path = "SCHEMA_NAME", public, pg_catalog; --- Plan for 1 test -SELECT plan(1); +-- Plan for 7 test +SELECT plan(7); -- Extract and test the "status" field from the function's JSON response SELECT is( (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, - "data":{"filterFields":{}, "pageInfo":{}, "resultId":"test0", "step": 2}}$$)::JSON)->>'status', + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 1}}$$)::JSON)->>'status', 'Accepted', - 'Check if gw_fct_pg2epa_main returns status "Accepted"' + 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=1 returns status "Accepted"' +); + +SELECT is( + (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 2}}$$)::JSON)->>'status', + 'Accepted', + 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=2 returns status "Accepted"' +); + +SELECT is( + (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 3}}$$)::JSON)->>'status', + 'Accepted', + 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=3 returns status "Accepted"' +); + +SELECT is( + (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 4}}$$)::JSON)->>'status', + 'Accepted', + 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=4 returns status "Accepted"' +); + +SELECT is( + (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 5}}$$)::JSON)->>'status', + 'Accepted', + 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=5 returns status "Accepted"' +); + +SELECT is( + (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 6}}$$)::JSON)->>'status', + 'Accepted', + 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=6 returns status "Accepted"' +); + +SELECT is( + (gw_fct_pg2epa_main($${"client":{"device":4, "lang":"", "infoType":1, "epsg":25831}, "form":{}, "feature":{}, + "data":{"filterFields":{}, "pageInfo":{}, "resultId":"testing", "dumpSubcatch":"False", "step": 7}}$$)::JSON)->>'status', + 'Accepted', + 'Check if gw_fct_pg2epa_main: dumpSubcatch=False | step=7 returns status "Accepted"' ); -- Finish the test