mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
Calling Payload::Base.to_s returns empty on the second call
This commit is contained in:
parent
0037bf373b
commit
a200e4facf
1 changed files with 8 additions and 0 deletions
|
@ -3,6 +3,14 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe RestClient::Payload do
|
||||
context "Base Payload" do
|
||||
it "should reset stream after to_s" do
|
||||
payload = RestClient::Payload::Base.new('foobar')
|
||||
payload.to_s.should eq 'foobar'
|
||||
payload.to_s.should eq 'foobar'
|
||||
end
|
||||
end
|
||||
|
||||
context "A regular Payload" do
|
||||
it "should use standard enctype as default content-type" do
|
||||
RestClient::Payload::UrlEncoded.new({}).headers['Content-Type'].
|
||||
|
|
Loading…
Reference in a new issue