Skip to content

Business intelligence made simple

652 B
Raw Blame
require_relative "../test_helper"

class DrillTest < ActionDispatch::IntegrationTest
  include AdapterTest

  def data_source
    "drill"
  end

  def test_run
    assert_result [{"hello" => "world"}], "SELECT 'world' AS hello"
  end

  def test_audit
    assert_audit "SELECT 'world' AS hello", "SELECT {var} AS hello", var: "world"
  end

  def test_single_quote
    assert_result [{"hello" => "'"}], "SELECT {var} AS hello", var: "'"
  end

  def test_double_quote
    assert_result [{"hello" => '"'}], "SELECT {var} AS hello", var: '"'
  end

  def test_backslash
    assert_result [{"hello" => "\\"}], "SELECT {var} AS hello", var: "\\"
  end
end