Sha256: 1870922dee7e89cf54455dbefe824e58423e23661256a1b5d48a6066d00fc708

Contents?: true

Size: 672 Bytes

Versions: 5

Compression:

Stored size: 672 Bytes

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
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
airborne-0.0.18 spec/airborne/headers_spec.rb
airborne-0.0.17 spec/airborne/headers_spec.rb
airborne-0.0.16 spec/airborne/headers_spec.rb
airborne-0.0.15 spec/airborne/headers_spec.rb
airborne-0.0.14 spec/airborne/headers_spec.rb