Sha256: 8aa9d82a05cb48b0a32ec70519320585b34f4c2e1777d7cb592c08cbad25d39b
Contents?: true
Size: 551 Bytes
Versions: 3
Compression:
Stored size: 551 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
airborne-0.1.8 | spec/airborne/post_spec.rb |
airborne-0.1.7 | spec/airborne/post_spec.rb |
airborne-0.1.6 | spec/airborne/post_spec.rb |