Sha256: c7e27de8fe39882e7e66f3d66aa66ef9b57cd00e48e1fa1d65ad213fe9852a79

Contents?: true

Size: 455 Bytes

Versions: 11

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

RSpec.describe FinAppsCore::Middleware::UserAgent do
  let(:fake_app) { proc {|env| env } }

  describe '#call' do
    subject(:user_agent) { described_class.new(fake_app) }

    let(:key) { FinAppsCore::Middleware::UserAgent::KEY }

    env = {request_headers: {}}

    it('generates a UserAgent header') do
      expect(user_agent.call(env)[:request_headers][key])
        .to start_with('finapps-ruby')
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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