spec/lib/hyperion_spec.rb in hyperion_http-0.1.2 vs spec/lib/hyperion_spec.rb in hyperion_http-0.1.3
- old
+ new
@@ -17,11 +17,11 @@
expected_headers = {
'Accept' => "application/vnd.indigobio-ascent.#{rd.type}-v#{rd.version}+#{rd.format}",
'Content-Type' => 'application/x-protobuf',
'From' => 'dev@indigobio.com',
- 'Expect' => 'x'
+ 'Expect' => nil
}
expect(Hyperion::Typho).to receive(:request).
with(uri, {method: method, headers: expected_headers, body: 'Ventura'}).
and_return(make_typho_response(200, write({'foo' => 'bar'}, :json)))
@@ -41,10 +41,10 @@
let!(:pd){PayloadDescriptor.new(:json)}
let!(:route){RestRoute.new(method, uri, rd, pd)}
let!(:expected_headers){{
'Accept' => "application/vnd.indigobio-ascent.#{rd.type}-v#{rd.version}+#{rd.format}",
'Content-Type' => 'application/json',
- 'Expect' => 'x'
+ 'Expect' => nil
}}
it 'deserializes the response' do
allow(Hyperion::Typho).to receive(:request).and_return(make_typho_response(200, '{"a":"b"}'))
result = Hyperion.request(route)
expect(result.body).to eql({'a' => 'b'})