Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix some tests around pubsubhubub

  • Loading branch information...
commit 64dae868fede4645ea304bcc0acc3c6104bd0386 1 parent 133c9ee
@maxwell maxwell authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/pubsubhubbub.rb
  2. +2 −2 spec/lib/pubsubhubbub_spec.rb
View
2  lib/pubsubhubbub.rb
@@ -9,9 +9,9 @@ def initialize(hub, options={})
end
def publish(feed)
+
conn = Faraday.new do |c|
c.use Faraday::Request::UrlEncoded # encode request params as "www-form-urlencoded"
- c.use Faraday::Response::Logger # log request & response to STDOUT
c.use Faraday::Adapter::NetHttp # perform requests with Net::HTTP
end
conn.post @hub, {'hub.url' => feed, 'hub.mode' => 'publish'}
View
4 spec/lib/pubsubhubbub_spec.rb
@@ -13,7 +13,7 @@
body = {'hub.url' => feed, 'hub.mode' => 'publish'}
stub_request(:post, "http://hubzord.com/").to_return(:status => [202, 'you are awesome'])
- Pubsubhubbub.new(hub).publish(feed).code.should == 202
+ Pubsubhubbub.new(hub).publish(feed).should be_success
end
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.