@@ -152,7 +152,7 @@ defmodule AttachmentMultipartTest do
152152 assert Enum . at ( sections , 2 ) . headers [ "Content-Disposition" ] ==
153153 ~s( attachment; filename="bar.txt")
154154
155- doc = :jiffy . decode ( Enum . at ( sections , 0 ) . body , [ :return_maps ] )
155+ doc = :jiffy . decode ( Enum . at ( sections , 0 ) . body , [ :return_maps , :use_nil ] )
156156
157157 assert doc [ "_attachments" ] [ "foo.txt" ] [ "follows" ] == true
158158 assert doc [ "_attachments" ] [ "bar.txt" ] [ "follows" ] == true
@@ -175,7 +175,7 @@ defmodule AttachmentMultipartTest do
175175 sections = parse_multipart ( resp )
176176 assert length ( sections ) == 2
177177
178- doc = :jiffy . decode ( Enum . at ( sections , 0 ) . body , [ :return_maps ] )
178+ doc = :jiffy . decode ( Enum . at ( sections , 0 ) . body , [ :return_maps , :use_nil ] )
179179
180180 assert doc [ "_attachments" ] [ "foo.txt" ] [ "stub" ] == true
181181 assert doc [ "_attachments" ] [ "bar.txt" ] [ "follows" ] == true
@@ -206,7 +206,7 @@ defmodule AttachmentMultipartTest do
206206 assert length ( inner_sections ) == 2
207207 assert Enum . at ( inner_sections , 0 ) . headers [ "Content-Type" ] == "application/json"
208208
209- doc = :jiffy . decode ( Enum . at ( inner_sections , 0 ) . body , [ :return_maps ] )
209+ doc = :jiffy . decode ( Enum . at ( inner_sections , 0 ) . body , [ :return_maps , :use_nil ] )
210210 assert doc [ "_attachments" ] [ "foo.txt" ] [ "stub" ] == true
211211 assert doc [ "_attachments" ] [ "bar.txt" ] [ "follows" ] == true
212212
@@ -228,7 +228,7 @@ defmodule AttachmentMultipartTest do
228228
229229 assert length ( sections ) == 2
230230
231- doc = :jiffy . decode ( Enum . at ( sections , 0 ) . body , [ :return_maps ] )
231+ doc = :jiffy . decode ( Enum . at ( sections , 0 ) . body , [ :return_maps , :use_nil ] )
232232 assert doc [ "_attachments" ] [ "foo.txt" ] [ "stub" ] == true
233233 assert doc [ "_attachments" ] [ "bar.txt" ] [ "follows" ] == true
234234 assert Enum . at ( sections , 1 ) . body == "this is 18 chars l"
@@ -377,7 +377,7 @@ defmodule AttachmentMultipartTest do
377377 assert length ( inner_sections ) == 3
378378 assert Enum . at ( inner_sections , 0 ) . headers [ "Content-Type" ] == "application/json"
379379
380- doc = :jiffy . decode ( Enum . at ( inner_sections , 0 ) . body , [ :return_maps ] )
380+ doc = :jiffy . decode ( Enum . at ( inner_sections , 0 ) . body , [ :return_maps , :use_nil ] )
381381 assert doc [ "_attachments" ] [ "lorem.txt" ] [ "follows" ] == true
382382 assert doc [ "_attachments" ] [ "lorem.txt" ] [ "encoding" ] == "gzip"
383383 assert doc [ "_attachments" ] [ "data.bin" ] [ "follows" ] == true
@@ -414,7 +414,7 @@ defmodule AttachmentMultipartTest do
414414 # 2 inner sections: a document body section plus 1 attachment data section
415415 assert length ( inner_sections ) == 2
416416 assert Enum . at ( inner_sections , 0 ) . headers [ "Content-Type" ] == "application/json"
417- doc = :jiffy . decode ( Enum . at ( inner_sections , 0 ) . body , [ :return_maps ] )
417+ doc = :jiffy . decode ( Enum . at ( inner_sections , 0 ) . body , [ :return_maps , :use_nil ] )
418418 assert doc [ "_attachments" ] [ "lorem.txt" ] [ "follows" ] == true
419419 assert doc [ "_attachments" ] [ "lorem.txt" ] [ "encoding" ] == "gzip"
420420 assert Enum . at ( inner_sections , 1 ) . body != lorem
@@ -434,7 +434,7 @@ defmodule AttachmentMultipartTest do
434434 boundary = Enum . at ( String . split ( boundary_arg , "=" ) , 1 )
435435
436436 if String . starts_with? ( boundary , ~s( ") ) do
437- :jiffy . decode ( boundary )
437+ :jiffy . decode ( boundary , [ :use_nil ] )
438438 else
439439 boundary
440440 end
0 commit comments