Sha256: 7ba15106af6605f2d53fd1c41c96ac99150af7a92d34bc3fa8e6b54b016f61ac

Contents?: true

Size: 459 Bytes

Versions: 11

Compression:

Stored size: 459 Bytes

Contents

# frozen_string_literal: true

RSpec.describe FinAppsCore::Middleware::RequestId do
  let(:id) { 'request_id' }
  let(:fake_app) { proc {|env| env } }
  let(:env) { {request_headers: {}} }

  describe '#call' do
    subject(:request_id) { described_class.new(fake_app, id) }

    it('generates a X-Request-Id header') do
      key = FinAppsCore::Middleware::RequestId::KEY
      expect(request_id.call(env)[:request_headers][key]).to eq(id)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
finapps_core-6.0.2 spec/middleware/request/request_id_spec.rb
finapps_core-6.0.1 spec/middleware/request/request_id_spec.rb
finapps_core-6.0.0 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.16 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.15 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.14 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.13 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.11 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.10 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.9 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.8 spec/middleware/request/request_id_spec.rb