Sha256: 6b0e5bf1ca8a6dec083e229d829bfaab6280bd1a6f760dda9d07f7ce47af20d4
Contents?: true
Size: 580 Bytes
Versions: 1
Compression:
Stored size: 580 Bytes
Contents
require 'spec_helper' describe Capistrano::CloudFlare do it { should be_a Module } describe '.send_request' do it 'should POST to the cloudflare API and return the response body as a hash' do options = { domain: 'example.com', email: 'me@example.com', api_key: 'F' } body = { 'result' => 'success' } stub_request(:post, 'https://www.cloudflare.com/api_json.html').to_return( :status => 200, :body => body.to_json ) Capistrano::CloudFlare.send_request(options).should eq(body) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capistrano-cloudflare-1.0.0 | spec/capistrano/cloudflare_spec.rb |