Sha256: 83dacff3e8f2fd6ab33946d6a8d3d32a02274a58532bed4ba3afcd56b6c83564

Contents?: true

Size: 474 Bytes

Versions: 11

Compression:

Stored size: 474 Bytes

Contents

require 'jdbc_common'
require 'db/mssql'

class MsSQLNullTest < Test::Unit::TestCase
  include MigrationSetup

  [nil, "NULL", "null", "(null)", "(NULL)"].each_with_index do |v, i|
    define_method "test_null_#{i}" do
      entry = Entry.create!(:title => v, :content => v)
      entry = Entry.find(entry.id)
      assert_equal [v, v], [entry.title, entry.content], "writing #{v.inspect} should read back as #{v.inspect} for both string and text columns"
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
activerecord-jdbc-adapter-1.2.9.1 test/mssql_null_test.rb
activerecord-jdbc-adapter-1.2.9 test/mssql_null_test.rb
activerecord-jdbc-adapter-1.2.8 test/mssql_null_test.rb
activerecord-jdbc-adapter-1.2.5 test/mssql_null_test.rb
tgbyte-activerecord-jdbc-adapter-1.2.2.5 test/mssql_null_test.rb
tgbyte-activerecord-jdbc-adapter-1.2.2.4 test/mssql_null_test.rb
tgbyte-activerecord-jdbc-adapter-1.2.2.3 test/mssql_null_test.rb
tgbyte-activerecord-jdbc-adapter-1.2.2.2 test/mssql_null_test.rb
activerecord-jdbc-adapter-1.2.2.1 test/mssql_null_test.rb
activerecord-jdbc-adapter-onsite-1.2.2 test/mssql_null_test.rb
activerecord-jdbc-adapter-1.2.2 test/mssql_null_test.rb