Sha256: 7bbffcb0298c8626d993ab9b488b97b1e7c38c9f8bfc78b256b8a54ddff69f60

Contents?: true

Size: 462 Bytes

Versions: 11

Compression:

Stored size: 462 Bytes

Contents

# frozen_string_literal: true

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

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

    env = {request_headers: {}}

    it('generates a UserAgent header') do
      header_key = FinAppsCore::Middleware::AcceptJson::KEY
      expect(accept_json.call(env)[:request_headers][header_key])
        .to eq('application/json')
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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