test/test_document.rb in couchpillow-0.3.5 vs test/test_document.rb in couchpillow-0.3.6

- old
+ new

@@ -186,9 +186,16 @@ def test_to_json mock_time d = Document.new({}, "1") assert_equal "{\"_id\":\"1\",\"created_at\":\"#{mock_time.to_s}\",\"_type\":\"default\"}", d.to_json end + + + def test_to_hash + mock_time + d = Document.new({}, "1") + assert_equal({ :_id => "1", :created_at => mock_time, :_type => "default" }, d.to_hash) + end def test_brackets d = Document.new({}) d[123] = 'test'