Skip to content

Commit

Permalink
Merge pull request #26 from Acconut/missing-fields
Browse files Browse the repository at this point in the history
Do not delete fields hash
  • Loading branch information
rmehner committed Dec 27, 2015
2 parents a83b6d3 + 71f835f commit 80182f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/transloadit/assembly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def to_hash
self.options.merge(
:auth => self.transloadit.to_hash,
:steps => self.steps
).delete_if {|k,v| v.nil? || k == :fields}
).delete_if {|k,v| v.nil?}
end

#
Expand Down
2 changes: 1 addition & 1 deletion test/unit/transloadit/test_assembly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
assert_requested(:post, 'jane.transloadit.com/assemblies') do |req|
values = values_from_post_body(req.body)
values['tag'].must_equal 'ninja-cat'
MultiJson.load(values['params'])['fields'].must_be_nil
MultiJson.load(values['params'])['fields']['tag'].must_equal 'ninja-cat'
end
end
end
Expand Down

0 comments on commit 80182f4

Please sign in to comment.