fix some tests around pubsubhubub
This commit is contained in:
parent
133c9ee0c3
commit
64dae868fe
2 changed files with 3 additions and 3 deletions
|
|
@ -9,9 +9,9 @@ class Pubsubhubbub
|
|||
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'}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ describe Pubsubhubbub do
|
|||
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
|
||||
Loading…
Reference in a new issue