aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-12-06 08:30:27 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-12-06 08:30:27 +0900
commitd2321aacc7451f6b4f154d894adcb76820abba3c (patch)
treeb5a106296513d0c02a565d1330d65a1339cda818
parent23226d04f921b79f0077ba38c5a5a923b6d43f89 (diff)
downloadrails-d2321aacc7451f6b4f154d894adcb76820abba3c.tar.gz
rails-d2321aacc7451f6b4f154d894adcb76820abba3c.tar.bz2
rails-d2321aacc7451f6b4f154d894adcb76820abba3c.zip
Revert "Merge pull request #31341 from yahonda/skip_json_attribute_test"
This reverts commit 23226d04f921b79f0077ba38c5a5a923b6d43f89, reversing changes made to 7544cf7603959f25100b21f70b5e70354bed7e45.
-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