Sha256: 60912d08fa8952aa13175bd9f0a0cb4331ef4ff836ef6cba9910fde2f59920fd

Contents?: true

Size: 468 Bytes

Versions: 15

Compression:

Stored size: 468 Bytes

Contents

# frozen_string_literal: true

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

  describe '#call' do
    subject { FinAppsCore::Middleware::RequestId.new(fake_app, id) }

    it('generates a X-Request-Id header') do
      expect(subject.call(env)[:request_headers][key]).to eq(id)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
finapps_core-5.0.7 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.6 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.5 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.4 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.3 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.2 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.1 spec/middleware/request/request_id_spec.rb
finapps_core-5.0.0 spec/middleware/request/request_id_spec.rb
finapps_core-4.0.7 spec/middleware/request/request_id_spec.rb
finapps_core-4.0.6 spec/middleware/request/request_id_spec.rb
finapps_core-4.0.5 spec/middleware/request/request_id_spec.rb
finapps_core-4.0.4 spec/middleware/request/request_id_spec.rb
finapps_core-4.0.3 spec/middleware/request/request_id_spec.rb
finapps_core-4.0.2 spec/middleware/request/request_id_spec.rb
finapps_core-4.0.0 spec/middleware/request/request_id_spec.rb