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:
parent
9a79b5363c
commit
e786349694
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue