aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/test/cases/json_attribute_test.rb46
1 files changed, 22 insertions, 24 deletions
diff --git a/activerecord/test/cases/json_attribute_test.rb b/activerecord/test/cases/json_attribute_test.rb
index a6fd4f34dc..63f3c77fc3 100644
--- a/activerecord/test/cases/json_attribute_test.rb
+++ b/activerecord/test/cases/json_attribute_test.rb
@@ -3,35 +3,33 @@
require "cases/helper"
require "cases/json_shared_test_cases"
-if ActiveRecord::Base.connection.supports_json?
- class JsonAttributeTest < ActiveRecord::TestCase
- include JSONSharedTestCases
- self.use_transactional_tests = false
+class JsonAttributeTest < ActiveRecord::TestCase
+ include JSONSharedTestCases
+ self.use_transactional_tests = false
- class JsonDataTypeOnText < ActiveRecord::Base
- self.table_name = "json_data_type"
+ class JsonDataTypeOnText < ActiveRecord::Base
+ self.table_name = "json_data_type"
- attribute :payload, :json
- attribute :settings, :json
+ attribute :payload, :json
+ attribute :settings, :json
- store_accessor :settings, :resolution
- end
+ store_accessor :settings, :resolution
+ end
- def setup
- super
- @connection.create_table("json_data_type") do |t|
- t.text "payload"
- t.text "settings"
- end
+ def setup
+ super
+ @connection.create_table("json_data_type") do |t|
+ t.text "payload"
+ t.text "settings"
end
+ end
- private
- def column_type
- :text
- end
+ private
+ def column_type
+ :text
+ end
- def klass
- JsonDataTypeOnText
- end
- end
+ def klass
+ JsonDataTypeOnText
+ end
end