spec/item/save_spec.rb in lhs-5.6.1 vs spec/item/save_spec.rb in lhs-5.6.2

- old
+ new

@@ -48,7 +48,19 @@ stub_request(:post, item.href) .with(body: item._raw.to_json) .to_return(status: 500) expect(-> { item.save! }).to raise_error LHC::ServerError end + + it 'keeps header psassed in the options' do + headers = { 'Stats' => 'first-access' } + request = stub_request(:post, item.href) + .with( + body: item._raw.to_json, + headers: headers) + .to_return(status: 200, body: item._raw.to_json) + + item.save!(headers: headers) + expect(request).to have_been_requested + end end end