Sha256: a5e580d208f1ed230929ad33d52c9c437ccaa22d8ef3f00b8b9d6413ca4a87da
Contents?: true
Size: 1.05 KB
Versions: 3
Compression:
Stored size: 1.05 KB
Contents
require 'spec_helper' describe 'expect header' do it 'should find exact match for header content' do mock_get('simple_get', {'Content-Type' => 'application/json'}) get '/simple_get' expect_header(:content_type, 'application/json') end it 'should ensure correct headers are present' do mock_get('simple_get', {'Content-Type' => 'application/json'}) get '/simple_get' expect{expect_header(:foo, 'bar')}.to raise_error end end describe 'expect header contains' do it 'should ensure partial header match exists' do mock_get('simple_get', {'Content-Type' => 'application/json'}) get '/simple_get' expect_header_contains(:content_type, 'json') end it 'should ensure header is present' do mock_get('simple_get', {'Content-Type' => 'application/json'}) get '/simple_get' expect{expect_header_contains(:foo, 'bar')}.to raise_error end it 'should ensure partial header is present' do mock_get('simple_get', {'Content-Type' => 'application/json'}) get '/simple_get' expect{expect_header_contains(:content_type, 'bar')}.to raise_error end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
airborne-0.0.21 | spec/airborne/headers_spec.rb |
airborne-0.0.20 | spec/airborne/headers_spec.rb |
airborne-0.0.19 | spec/airborne/headers_spec.rb |