Sha256: 559a600f8da4086923000f97840e691b5d93d525af454718e6bb63b1a9df94b9

Contents?: true

Size: 478 Bytes

Versions: 11

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

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

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

    it('generates an X-Consumer-ID header') do
      key = FinAppsCore::Middleware::XConsumerId::KEY
      expect(x_consumer_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/x_consumer_id_spec.rb
finapps_core-6.0.1 spec/middleware/request/x_consumer_id_spec.rb
finapps_core-6.0.0 spec/middleware/request/x_consumer_id_spec.rb
finapps_core-5.0.16 spec/middleware/request/x_consumer_id_spec.rb
finapps_core-5.0.15 spec/middleware/request/x_consumer_id_spec.rb
finapps_core-5.0.14 spec/middleware/request/x_consumer_id_spec.rb
finapps_core-5.0.13 spec/middleware/request/x_consumer_id_spec.rb
finapps_core-5.0.11 spec/middleware/request/x_consumer_id_spec.rb
finapps_core-5.0.10 spec/middleware/request/x_consumer_id_spec.rb
finapps_core-5.0.9 spec/middleware/request/x_consumer_id_spec.rb
finapps_core-5.0.8 spec/middleware/request/x_consumer_id_spec.rb