aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2016-08-20 06:40:15 -0400
committerGitHub <noreply@github.com>2016-08-20 06:40:15 -0400
commit02c9a78489dae495f15f4bc967359308ca4203f6 (patch)
treeea366d2975d6509956401511c1a73e693f96c70b /activerecord/test
parentbf35e2f33a0744c8cf4df9f957e5409d8c8003b1 (diff)
parentf1d9fc5d346a6a1bc6728bad544196c62fc50cac (diff)
downloadrails-02c9a78489dae495f15f4bc967359308ca4203f6.tar.gz
rails-02c9a78489dae495f15f4bc967359308ca4203f6.tar.bz2
rails-02c9a78489dae495f15f4bc967359308ca4203f6.zip
Merge pull request #26232 from kamipo/fix_oid_bit_cast_value
Fix `OID::Bit#cast_value`
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/adapters/postgresql/bit_string_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/bit_string_test.rb b/activerecord/test/cases/adapters/postgresql/bit_string_test.rb
index f646e59848..7712e809a2 100644
--- a/activerecord/test/cases/adapters/postgresql/bit_string_test.rb
+++ b/activerecord/test/cases/adapters/postgresql/bit_string_test.rb
@@ -65,10 +65,11 @@ class PostgresqlBitStringTest < ActiveRecord::PostgreSQLTestCase
end
def test_roundtrip
- PostgresqlBitString.create! a_bit: "00001010", a_bit_varying: "0101"
- record = PostgresqlBitString.first
+ record = PostgresqlBitString.create!(a_bit: "00001010", a_bit_varying: "0101")
assert_equal "00001010", record.a_bit
assert_equal "0101", record.a_bit_varying
+ assert_nil record.another_bit
+ assert_nil record.another_bit_varying
record.a_bit = "11111111"
record.a_bit_varying = "0xF"