Skip to content

Commit 0bf2705

Browse files
committed
Codify nil behavior with test
1 parent 4fbb2f5 commit 0bf2705

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/types/hash_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,10 @@ class HashTest < ActiveSupport::TestCase
124124
@hash = Kredis.hash "myhash", typed: :integer, default: ->() { { space_invaders: "100", pong: "42" } }
125125
assert_equal({ "space_invaders" => 100, "pong" => 42 }, @hash.to_h)
126126
end
127+
128+
test "does not support nil values" do
129+
assert_raises do
130+
@hash.update("key" => nil)
131+
end
132+
end
127133
end

0 commit comments

Comments
 (0)