1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Improve test to ensure filter is called

This commit is contained in:
Thomas Walpole 2018-11-16 09:51:40 -08:00
parent 9a79b5363c
commit e786349694

View file

@ -428,7 +428,11 @@ RSpec.describe Capybara do
context 'when modified' do
it 'should still work' do
filter = Capybara::Selector.all[:link_or_button].expression_filters[:random]
allow(filter).to receive(:apply_filter).and_call_original
expect(string.find(:link_or_button, 'click me', random: 'blah').value).to eq 'click me'
expect(filter).to have_received(:apply_filter).with(anything, :random, 'blah', anything)
end
end
end