From c93c2625789ec9b2f5102430eeda05c408b088d1 Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Thu, 19 Jun 2014 09:29:12 -0700 Subject: [PATCH] basic test for fill_in options propagation --- spec/rack_test_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/rack_test_spec.rb b/spec/rack_test_spec.rb index f5b07038..70a6979b 100644 --- a/spec/rack_test_spec.rb +++ b/spec/rack_test_spec.rb @@ -57,6 +57,15 @@ RSpec.describe Capybara::Session do @session.driver.options[:respect_data_method] = false end end + + describe "#fill_in" do + it "should warn that :fill_options are not supported" do + expect_any_instance_of(Capybara::Node::Element).to receive(:warn) + .with("Options passed to Capybara::Node#set but the driver doesn't support them") + @session.visit "/with_html" + @session.fill_in 'test_field', with: 'not_moneky', fill_options: { random: true } + end + end describe "#attach_file" do context "with multipart form" do