Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qa/spec/resource/base_spec.rb')
-rw-r--r--qa/spec/resource/base_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/qa/spec/resource/base_spec.rb b/qa/spec/resource/base_spec.rb
index 2a26a479436..2dd25f983bf 100644
--- a/qa/spec/resource/base_spec.rb
+++ b/qa/spec/resource/base_spec.rb
@@ -277,17 +277,30 @@ RSpec.describe QA::Resource::Base do
describe '#visit!' do
include_context 'with simple resource'
+ let(:wait_for_requests_class) { QA::Support::WaitForRequests }
+
before do
allow(resource).to receive(:visit)
end
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
resource.web_url = subject.current_url
resource.visit!
expect(resource).to have_received(:visit).with(subject.current_url)
end
+
+ 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
+
+ resource.web_url = subject.current_url
+ resource.visit!(skip_resp_code_check: true)
+
+ expect(resource).to have_received(:visit).with(subject.current_url)
+ end
end
end