From c8e3cf55008bafff88de7ce0ada45ea94d08deac Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 16 Sep 2015 12:09:32 +0200 Subject: [PATCH] Add test courtesy of Paul #154 --- test/CDB_CartodbfyTableTest.sql | 15 +++++++++++++++ test/CDB_CartodbfyTableTest_expect | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/test/CDB_CartodbfyTableTest.sql b/test/CDB_CartodbfyTableTest.sql index b5678f4..b35540b 100644 --- a/test/CDB_CartodbfyTableTest.sql +++ b/test/CDB_CartodbfyTableTest.sql @@ -266,6 +266,21 @@ SELECT CDB_CartodbfyTableCheck('many_geometry_columns', 'Table with both the_geo SELECT * FROM many_geometry_columns; DROP TABLE many_geometry_columns; +-- Many colliding geom columns +CREATE TABLE many_colliding_columns ( + the_geom varchar, + the_geom_webmercator varchar, + my_geom geometry, + my_mercgeom geometry(Point, 3857), + cartodb_id varchar, + my_pk integer primary key +); +INSERT INTO many_colliding_columns VALUES ( + 'foo', 'bar', 'SRID=4326;POINT(0 0)', 'SRID=3857;POINT(0 0)', 'nerf', 1 +); +SELECT CDB_CartodbfyTableCheck('many_colliding_columns', 'Many colliding columns #141'); +DROP TABLE many_colliding_columns; + -- TODO: table with existing custom-triggered the_geom diff --git a/test/CDB_CartodbfyTableTest_expect b/test/CDB_CartodbfyTableTest_expect index b075abe..6287c3f 100644 --- a/test/CDB_CartodbfyTableTest_expect +++ b/test/CDB_CartodbfyTableTest_expect @@ -75,5 +75,9 @@ Table with both the_geom and wkb_geometry #141 cartodbfied fine 1|0104000020E61000000100000001010000007108B023698052C03CEEA53A2E5D4440|0104000020110F00000100000001010000004A9F662B456D5FC11392690DC3F75241| 2|0104000020E6100000010000000101000000864C9E57618052C0994F0C7F3C5B4440|0104000020110F00000100000001010000002858E0EC376D5FC1CAE8DB4B95F55241| DROP TABLE +CREATE TABLE +INSERT 0 1 +Many colliding columns #141 cartodbfied fine +DROP TABLE DROP FUNCTION DROP FUNCTION