mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
Test for Resource#head
This commit is contained in:
parent
edb31a626c
commit
41e254e6c0
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
# 1.6.2
|
||||
|
||||
- add support for HEAD in resources (patch provided by tpresa)
|
||||
|
||||
# 1.6.1
|
||||
|
||||
- add response body in Exception#inspect
|
||||
|
|
|
@ -14,6 +14,11 @@ describe RestClient::Resource do
|
|||
@resource.get
|
||||
end
|
||||
|
||||
it "HEAD" do
|
||||
RestClient::Request.should_receive(:execute).with(:method => :head, :url => 'http://some/resource', :headers => {'X-Something' => '1'}, :user => 'jane', :password => 'mypass')
|
||||
@resource.head
|
||||
end
|
||||
|
||||
it "POST" do
|
||||
RestClient::Request.should_receive(:execute).with(:method => :post, :url => 'http://some/resource', :payload => 'abc', :headers => {:content_type => 'image/jpg', 'X-Something' => '1'}, :user => 'jane', :password => 'mypass')
|
||||
@resource.post 'abc', :content_type => 'image/jpg'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue