Business intelligence made simple
Added tests for JSON
Andrew Kanebc1dbc1f0a01
diff --git a/test/adapters/mysql_test.rb b/test/adapters/mysql_test.rbindex 5c288344..cecc4c39 100644--- a/test/adapters/mysql_test.rb+++ b/test/adapters/mysql_test.rb@@ -96,6 +96,10 @@ class MysqlTest < ActionDispatch::IntegrationTestassert_result [{"hello" => "0xF6"}], "SELECT UNHEX('F6') AS hello"end+ def test_json_output+ assert_result [{"json" => '{"hello": "world"}'}], %!SELECT JSON_OBJECT('hello', 'world') AS json!+ end+privatedef prepared_statements?diff --git a/test/adapters/postgresql_test.rb b/test/adapters/postgresql_test.rbindex de80b2ed..ab68b47a 100644--- a/test/adapters/postgresql_test.rb+++ b/test/adapters/postgresql_test.rb@@ -71,4 +71,12 @@ class PostgresqlTest < ActionDispatch::IntegrationTestdef test_binary_outputassert_result [{"bytea" => "\\x68656c6c6f"}], "SELECT 'hello'::bytea"end++ def test_json_output+ assert_result [{"json" => '{"hello": "world"}'}], %!SELECT '{"hello": "world"}'::json!+ end++ def test_jsonb_output+ assert_result [{"jsonb" => '{"hello": "world"}'}], %!SELECT '{"hello": "world"}'::jsonb!+ endend