Sha256: e4b32d1442d2161d634a058528246ecf14cf6e0c950eb38eadd002cde058f9be

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

require "#{File.expand_path(File.dirname(__FILE__))}/../test_helper"

class ReportingAdapterTest < ActiveSupport::TestCase
  setup do
    @adapter = ActiveRecord::ConnectionAdapters::ReportingAdapter.new
  end
  
  test "quote a single quote with a backslash" do
    assert_equal "'foo\\''", @adapter.quote('foo\'')
  end
  
  test "return integers as quoted boolean" do
    assert_equal "'1'", @adapter.quoted_true
    assert_equal "'0'", @adapter.quoted_false
  end
  
  test "quote a backslash with a backslash" do
    assert_equal "'foo\\\\'", @adapter.quote("foo\\")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
google_data_source-0.7.6 test/units/reporting_adapter_test.rb