spec/lib/hyperion/headers_spec.rb in hyperion_http-0.1.4 vs spec/lib/hyperion/headers_spec.rb in hyperion_http-0.1.5

- old
+ new

@@ -1,11 +1,13 @@ require 'hyperion' require 'hyperion/headers' +require 'abstractivator/trees/tree_compare' class Hyperion describe Headers do include Headers + include Abstractivator::Trees before :each do Hyperion.configure do |config| config.vendor_string = 'schmindigo-descent' end @@ -19,9 +21,13 @@ expect(headers['Accept']).to eql 'application/vnd.schmindigo-descent.ttt-v999+json' end it 'creates a content-type header for the payload descriptor' do headers = route_headers(RestRoute.new(:get, uri, ResponseDescriptor.new('ttt', 999, :json), PayloadDescriptor.new(:json))) expect(headers['Content-Type']).to eql 'application/json' + end + it 'merges the logatron headers' do + headers = route_headers(RestRoute.new(:get, uri, ResponseDescriptor.new('ttt', 999, :json))) + expect(tree_compare(headers, Logatron.http_headers)).to eql [] end end describe '#content_type_for' do it 'accepts format as a symbol' do