diff options
Diffstat (limited to 'qa/spec/resource/base_spec.rb')
-rw-r--r-- | qa/spec/resource/base_spec.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/qa/spec/resource/base_spec.rb b/qa/spec/resource/base_spec.rb index e0bfccf5e78..d7e16c1f84b 100644 --- a/qa/spec/resource/base_spec.rb +++ b/qa/spec/resource/base_spec.rb @@ -362,7 +362,8 @@ RSpec.describe QA::Resource::Base do it 'calls #visit with the underlying #web_url' do allow(resource).to receive(:current_url).and_return(subject.current_url) - expect(wait_for_requests_class).to receive(:wait_for_requests).with({ skip_resp_code_check: false }).twice + expect(wait_for_requests_class).to receive(:wait_for_requests).with({ skip_finished_loading_check: false, + skip_resp_code_check: false }).twice resource.web_url = subject.current_url resource.visit! @@ -372,12 +373,24 @@ RSpec.describe QA::Resource::Base do it 'calls #visit with the underlying #web_url with skip_resp_code_check specified as true' do allow(resource).to receive(:current_url).and_return(subject.current_url) - expect(wait_for_requests_class).to receive(:wait_for_requests).with({ skip_resp_code_check: true }).twice + expect(wait_for_requests_class).to receive(:wait_for_requests).with({ skip_finished_loading_check: false, + skip_resp_code_check: true }).twice resource.web_url = subject.current_url resource.visit!(skip_resp_code_check: true) expect(resource).to have_received(:visit).with(subject.current_url) end + + it 'calls #visit with the underlying #web_url with skip_finished_loading_check specified as true' do + allow(resource).to receive(:current_url).and_return(subject.current_url) + expect(wait_for_requests_class).to receive(:wait_for_requests).with({ skip_finished_loading_check: true, + skip_resp_code_check: false }).twice + + resource.web_url = subject.current_url + resource.visit!(skip_finished_loading_check: true) + + expect(resource).to have_received(:visit).with(subject.current_url) + end end end |