spec/lib/hyperion/formats_spec.rb in hyperion_http-0.1.5 vs spec/lib/hyperion/formats_spec.rb in hyperion_http-0.1.6
- old
+ new
@@ -19,9 +19,13 @@
end
it 'accepts format as a descriptor' do
descriptor = double(format: :json)
expect(write({'a' => 1}, descriptor)).to eql '{"a":1}'
end
+ it 'returns the body of a Multipart data request' do
+ data = Multipart.new(test: 'data')
+ expect(write(data, nil)).to eql data.body
+ end
context 'formats' do
context 'when writing json' do
it 'writes hashes with string keys' do
expect(write({'a' => 1}, :json)).to be_json_eql '{"a":1}'