Sha256: 3b8cd6fe37a9d3b4c92a77435fe7817ea7878e8866917e455fc5b4f8cb31774c

Contents?: true

Size: 562 Bytes

Versions: 6

Compression:

Stored size: 562 Bytes

Contents

require 'spec_helper'

describe 'Fetch proxy pac' do
  context '/v1/pac' do
    it 'finds an existing proxy pac' do
      create_file '.config/pacfiles/file1.pac', 'asdf'

      env = {
        'HOME' => working_directory,
      }

      with_environment env, clear: true do
        response = get('/v1/pac/file1.pac')
        expect(response.body).to eq('asdf')
      end
    end

    it 'exits with 404 if file does not exist' do
      response = get('/v1/pac/does_not_exist.pac')
      expect(response.body).to include('does_not_exist.pac')
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
local_pac-0.0.6 spec/features/fetch_proxy_pac_spec.rb
local_pac-0.0.5 spec/features/fetch_proxy_pac_spec.rb
local_pac-0.0.4 spec/features/fetch_proxy_pac_spec.rb
local_pac-0.0.3 spec/features/fetch_proxy_pac_spec.rb
local_pac-0.0.2 spec/features/fetch_proxy_pac_spec.rb
local_pac-0.0.1 spec/features/fetch_proxy_pac_spec.rb