Business intelligence made simple
Added test for geojson
Andrew Kane0a374070dd52
diff --git a/test/charts_test.rb b/test/charts_test.rbindex ecb64a6a..00af970f 100644--- a/test/charts_test.rb+++ b/test/charts_test.rb@@ -32,21 +32,6 @@ class ChartsTest < ActionDispatch::IntegrationTestassert_match "PieChart", response.bodyend- def test_map_latitude_longitude- run_query "SELECT 1.2 AS latitude, 3.4 AS longitude"- assert_match "map", response.body- end-- def test_map_lat_lon- run_query "SELECT 1.2 AS lat, 3.4 AS lon"- assert_match "map", response.body- end-- def test_map_lat_lng- run_query "SELECT 1.2 AS lat, 3.4 AS lng"- assert_match "map", response.body- end-def test_targetrun_query "SELECT NOW(), 1, 2 AS target"assert_match %{"name":"target"}, response.bodydiff --git a/test/maps_test.rb b/test/maps_test.rbnew file mode 100644index 00000000..b048fe7c--- /dev/null+++ b/test/maps_test.rb@@ -0,0 +1,23 @@+require_relative "test_helper"++class MapsTest < ActionDispatch::IntegrationTest+ def test_latitude_longitude+ run_query "SELECT 1.2 AS latitude, 3.4 AS longitude"+ assert_match "Map", response.body+ end++ def test_lat_lon+ run_query "SELECT 1.2 AS lat, 3.4 AS lon"+ assert_match "Map", response.body+ end++ def test_lat_lng+ run_query "SELECT 1.2 AS lat, 3.4 AS lng"+ assert_match "Map", response.body+ end++ def test_geojson+ run_query "SELECT '{}' AS geojson"+ assert_match "AreaMap", response.body+ end+end