summaryrefslogtreecommitdiffhomepage
path: root/test/tc_axlsx.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/tc_axlsx.rb')
-rw-r--r--test/tc_axlsx.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/tc_axlsx.rb b/test/tc_axlsx.rb
index e58ebafe..3903fc42 100644
--- a/test/tc_axlsx.rb
+++ b/test/tc_axlsx.rb
@@ -132,4 +132,12 @@ class TestAxlsx < Test::Unit::TestCase
nil_subject = InstanceValuesSubject.new(nil_obj: nil)
assert_equal({"nil_obj" => nil}, Axlsx.instance_values_for(nil_subject), 'should return nil ivars')
end
+
+ def test_hash_deep_merge
+ h1 = {foo: {bar: true}}
+ h2 = {foo: {baz: true}}
+ assert_equal({foo: {baz: true}}, h1.merge(h2))
+ assert_equal({foo: {bar: true, baz: true}}, Axlsx.hash_deep_merge(h1, h2))
+ end
+
end