Sha256: 93892c7378217651286c5b9da53eb8748279d37dd4fe433ad7b49d76e4a4cd6f

Contents?: true

Size: 545 Bytes

Versions: 28

Compression:

Stored size: 545 Bytes

Contents

require 'spec_helper'
require 'webmock/rspec'

describe 'post' do
  it 'should allow testing on post requests' do
    mock_post('simple_post')
    post '/simple_post', {}
    expect_json_types(status: :string, someNumber: :int)
  end

  it 'should allow testing on post requests' do
    url = 'http://www.example.com/simple_post'
    stub_request(:post, url)
    post '/simple_post', 'hello', content_type: 'text/plain'
    expect(WebMock).to have_requested(:post, url).with(body: 'hello', headers: { 'Content-Type' => 'text/plain' })
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
airborne-0.3.5 spec/airborne/post_spec.rb
hops-airborne-0.2.17 spec/airborne/post_spec.rb
airborne-0.3.4 spec/airborne/post_spec.rb
airborne-0.3.3 spec/airborne/post_spec.rb
airborne-0.3.2 spec/airborne/post_spec.rb
airborne-0.3.1 spec/airborne/post_spec.rb
airborne-0.3.0 spec/airborne/post_spec.rb
hops-airborne-0.2.16 spec/airborne/post_spec.rb
hops-airborne-0.2.15 spec/airborne/post_spec.rb
airborne-0.2.13 spec/airborne/post_spec.rb
airborne-0.2.12 spec/airborne/post_spec.rb
airborne-0.2.11 spec/airborne/post_spec.rb
airborne-0.2.10 spec/airborne/post_spec.rb
airborne-0.2.9 spec/airborne/post_spec.rb
airborne-0.2.8 spec/airborne/post_spec.rb
airborne-0.2.7 spec/airborne/post_spec.rb
airborne-0.2.6 spec/airborne/post_spec.rb
airborne-0.2.5 spec/airborne/post_spec.rb
airborne-0.2.4 spec/airborne/post_spec.rb
airborne-0.2.3 spec/airborne/post_spec.rb