Skip to content
Snippets Groups Projects
Commit d7c56eb5 authored by Wact B. Prot's avatar Wact B. Prot
Browse files

prepair nil insert test

parent b9ce2d1d
No related branches found
No related tags found
No related merge requests found
...@@ -48,13 +48,7 @@ ...@@ -48,13 +48,7 @@
(def doc1 {:Calibration {:Measurement (def doc1 {:Calibration {:Measurement
{:Values {:Values
{:Pressure []}}}}) {:Pressure []}}}})
(def doc2 {:Calibration {:Measurement
{:Values
{:Pressure [{:Type "a"
:Unit "a"
:Value [0]
:SdValue [0]
:N [1]}]}}}})
(def doc2 {:Calibration (def doc2 {:Calibration
{:Measurement {:Measurement
{:Values {:Values
...@@ -150,3 +144,29 @@ ...@@ -150,3 +144,29 @@
v1) v1)
1))) 1)))
"Map is inserted and values become vectors."))) "Map is inserted and values become vectors.")))
(comment
(def doc3 {:Calibration
{:Measurement
{:Values
{:Pressure [
{:Type "a"
:Unit "b"
:Value [0]
:SdValue [0]
:N [1]}]}}}})
(def m-val-nil {:Type "b" :Unit "b" :Value nil :SdValue nil :N nil})
(def p3 "Calibration.Measurement.Values.Pressure")
(deftest store-results-ii
(testing "value is nil"
(is (map? (store-results doc1 [] p1))
"Values got attached if they have equal Types.")))
(store-results doc3 [m-val-nil] p3)
{:Calibration
{:Measurement
{:Values
{:Pressure
[{:Type "a", :Unit "b", :Value [0], :SdValue [0], :N [1]}
{:Type "b", :Unit "b", :Value nil, :SdValue nil, :N nil}]}}}})
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment