Sha256: bfe18757cebb81165b9c580f47bfaef326925da513975f566c8f82919a7cec28
Contents?: true
Size: 1.39 KB
Versions: 3
Compression:
Stored size: 1.39 KB
Contents
# frozen_string_literal: true require 'spec_helper' describe Capybara::Mechanize::Driver, 'remote' do before do Capybara.app_host = remote_test_url end after do Capybara.app_host = nil end let(:driver) { Capybara::Mechanize::Driver.new(ExtendedTestApp) } context 'in remote mode' do it 'should pass arguments through to a get request' do driver.visit("#{remote_test_url}/form/get", form: { value: 'success' }) expect(driver.html).to include('success') end it 'should pass arguments through to a post request' do driver.post("#{remote_test_url}/form", form: { value: 'success' }) expect(driver.html).to include('success') end describe 'redirect' do it 'should handle redirects with http-params' do driver.visit "#{remote_test_url}/redirect_with_http_param" expect(driver.html).to include('correct redirect') end end context 'for a post request' do it 'transforms nested map in post data' do driver.post("#{remote_test_url}/form", form: { key: 'value' }) expect(driver.html).to match(/:key=>"value"|key: value/) end end context 'process remote request' do it 'transforms nested map in post data' do driver.submit(:post, "#{remote_test_url}/form", form: { key: 'value' }) expect(driver.html).to match(/:key=>"value"|key: value/) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems