Sha256: 7e3e0d803de2616df8f158d76ddc24bde48fc017781e360d0ba0314e80d1cbee

Contents?: true

Size: 694 Bytes

Versions: 4

Compression:

Stored size: 694 Bytes

Contents

# frozen_string_literal: true

require "cases/helper"
require "cases/json_shared_test_cases"

class JsonAttributeTest < ActiveRecord::TestCase
  include JSONSharedTestCases
  self.use_transactional_tests = false

  class JsonDataTypeOnText < ActiveRecord::Base
    self.table_name = "json_data_type"

    attribute :payload,  :json
    attribute :settings, :json

    store_accessor :settings, :resolution
  end

  def setup
    super
    @connection.create_table("json_data_type") do |t|
      t.string "payload"
      t.string "settings"
    end
  end

  private
    def column_type
      :string
    end

    def klass
      JsonDataTypeOnText
    end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ibm_db-5.5.0-x86-mingw32 test/cases/json_attribute_test.rb
ibm_db-5.4.1-x86-mingw32 test/cases/json_attribute_test.rb
ibm_db-5.4.0-x86-mingw32 test/cases/json_attribute_test.rb
ibm_db-5.3.2-x86-mingw32 test/cases/json_attribute_test.rb