inquisitio 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/inquisitio/document.rb +1 -1
- data/lib/inquisitio/version.rb +1 -1
- data/test/document_test.rb +20 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e07cc53ffa7b5cdb0d8b62c7f3afb38bec99b97
|
4
|
+
data.tar.gz: a954c3e4223e0b3df9a30271274d482ba793fb01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0037bcd1d4993960e3af1191d986b508000bc84f80c757c2db54097ee6a24bad66f17bf2a0190135ec53d1938cc46e1241d259edce2e8a8fb616830f6a6bf013
|
7
|
+
data.tar.gz: 76f5cec6d4ae58d2d9606f1e079cf92e0a05804da798b19375fbefedf7106cad4ecea23b2538bf835dc63728430bd5a80849d1202688427bcd3e443fc6628649
|
data/CHANGELOG.md
CHANGED
data/lib/inquisitio/document.rb
CHANGED
data/lib/inquisitio/version.rb
CHANGED
data/test/document_test.rb
CHANGED
@@ -44,5 +44,25 @@ module Inquisitio
|
|
44
44
|
assert_equal JSON.parse(@expected_SDF).to_json,
|
45
45
|
JSON.parse(@document.to_SDF).to_json
|
46
46
|
end
|
47
|
+
|
48
|
+
def test_should_ignore_null_field_values_when_creating_SDF_json
|
49
|
+
expected_SDF =
|
50
|
+
<<-EOS
|
51
|
+
{ "type": "add",
|
52
|
+
"id": "12345",
|
53
|
+
"version": 1,
|
54
|
+
"lang": "en",
|
55
|
+
"fields": {
|
56
|
+
"title": "The Title"
|
57
|
+
}
|
58
|
+
}
|
59
|
+
EOS
|
60
|
+
|
61
|
+
fields = { :title => 'The Title', :author => nil }
|
62
|
+
document = Document.new(@type, @id, @version, fields)
|
63
|
+
|
64
|
+
assert_equal JSON.parse(expected_SDF).to_json,
|
65
|
+
JSON.parse(document.to_SDF).to_json
|
66
|
+
end
|
47
67
|
end
|
48
68
|
end
|