Sha256: 3cbe473ccff6b1606e5beed6af08f7b47ab0d8752798e4da392c5fa716e9ea14
Contents?: true
Size: 702 Bytes
Versions: 12
Compression:
Stored size: 702 Bytes
Contents
require 'spec_helper' require 'faye/authentication' describe Faye::Authentication::HTTPClient do describe '.publish' do it 'should publish a HTTP request with correct params' do message = {'channel' => '/foo/bar', 'clientId' => 'http'} message['signature'] = Faye::Authentication.sign(message, 'my private key') message['data'] = 'hello' request = stub_request(:post, "http://www.example.com").with(:body => {:message => JSON.dump(message)}).to_return(:status => 200, :body => "", :headers => {}) Faye::Authentication::HTTPClient.publish('http://www.example.com', '/foo/bar', "hello", 'my private key') expect(request).to have_been_made end end end
Version data entries
12 entries across 12 versions & 1 rubygems