Sha256: c01e4302cd78765e785bf3f01a5eac91018e1a6844c5f74614b766b946b216f0

Contents?: true

Size: 629 Bytes

Versions: 14

Compression:

Stored size: 629 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe 'Have Requests with status code Matcher' do
  it 'checks if a site references a given list of domains with results in a given status code' do
    domains = { 
      'example.org' => 200,
    }

    use_proxy 'localhost:3128'
    visit('http://example.org')

    expect(page).to have_requests_with_status_code domains
  end

  it 'checks if a site not references a given list of domains' do
    domains = { 
      'example.org' => 500,
    }

    use_proxy 'localhost:3128'
    visit('http://example.org')

    expect(page).not_to have_requests_with_status_code domains
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
proxy_tester-0.1.10 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.1.8 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.1.6 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.1.5 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.1.4 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.1.3 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.1.2 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.1.1 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.1.0 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.0.9 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.0.8 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.0.7 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.0.6 spec/matchers/have_requests_with_status_code_spec.rb
proxy_tester-0.0.5 spec/matchers/have_requests_with_status_code_spec.rb