spec/unit/trello_wrapper_spec.rb in trollolo-0.0.8 vs spec/unit/trello_wrapper_spec.rb in trollolo-0.0.9
- old
+ new
@@ -63,11 +63,10 @@
stub_request(:get, "https://api.trello.com/1/cards/123?key=mykey&token=mytoken").
with(:headers => {'Accept'=>'*/*; q=0.5, application/xml', 'Accept-Encoding'=>'gzip, deflate', 'User-Agent'=>'Ruby'}).
to_return(:status => 200, :body => card_body, :headers => {})
stub_request(:post, "https://api.trello.com/1/cards/123/attachments?key=mykey&token=mytoken").
- with(:body => "--470924\r\nContent-Disposition: form-data; name=\"file\"; filename=\"attachment-data\"\r\nContent-Type: text/plain\r\n\r\nabc\n\r\n--470924\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\n\r\n--470924--\r\n",
- :headers => {'Accept'=>'*/*; q=0.5, application/xml', 'Accept-Encoding'=>'gzip, deflate', 'Content-Length'=>'188', 'Content-Type'=>'multipart/form-data; boundary=470924', 'User-Agent'=>'Ruby'}).
+ with(:headers => {'Accept'=>'*/*; q=0.5, application/xml', 'Accept-Encoding'=>'gzip, deflate', 'Content-Length'=>'188', 'Content-Type'=>'multipart/form-data; boundary=470924', 'User-Agent'=>'Ruby'}).
to_return(:status => 200, :body => "", :headers => {})
path = given_file("attachment-data")
subject.add_attachment("123", path)