aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/quoting_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/quoting_test.rb')
-rw-r--r--activerecord/test/cases/quoting_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/activerecord/test/cases/quoting_test.rb b/activerecord/test/cases/quoting_test.rb
index c01c82f4f5..225e23bc83 100644
--- a/activerecord/test/cases/quoting_test.rb
+++ b/activerecord/test/cases/quoting_test.rb
@@ -149,5 +149,21 @@ module ActiveRecord
assert_equal "1800", @quoter.quote(30.minutes)
end
end
+
+ class QuoteBooleanTest < ActiveRecord::TestCase
+ def setup
+ @connection = ActiveRecord::Base.connection
+ end
+
+ def test_quote_returns_frozen_string
+ assert_predicate @connection.quote(true), :frozen?
+ assert_predicate @connection.quote(false), :frozen?
+ end
+
+ def test_type_cast_returns_frozen_value
+ assert_predicate @connection.type_cast(true), :frozen?
+ assert_predicate @connection.type_cast(false), :frozen?
+ end
+ end
end
end