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/scenario/test/sanity/selectors_spec.rb')
-rw-r--r--qa/spec/scenario/test/sanity/selectors_spec.rb20
1 files changed, 13 insertions, 7 deletions
diff --git a/qa/spec/scenario/test/sanity/selectors_spec.rb b/qa/spec/scenario/test/sanity/selectors_spec.rb
index 2a68dd23219..ecc8e0e0f2c 100644
--- a/qa/spec/scenario/test/sanity/selectors_spec.rb
+++ b/qa/spec/scenario/test/sanity/selectors_spec.rb
@@ -5,20 +5,26 @@ RSpec.describe QA::Scenario::Test::Sanity::Selectors do
before do
stub_const('QA::Page::Validator', validator)
+
+ allow(QA::Runtime::Logger).to receive(:warn)
+ allow(QA::Runtime::Logger).to receive(:info)
end
context 'when there are errors detected' do
+ let(:error) { 'some error' }
+
before do
- allow(validator).to receive(:errors).and_return(['some error'])
+ allow(validator).to receive(:errors).and_return([error])
end
- it 'outputs information about errors' do
- expect { described_class.perform }
- .to output(/some error/).to_stderr
+ it 'outputs information about errors', :aggregate_failures do
+ described_class.perform
+
+ expect(QA::Runtime::Logger).to have_received(:warn)
+ .with(/GitLab QA sanity selectors validation test detected problems/)
- expect { described_class.perform }
- .to output(/electors validation test detected problems/)
- .to_stderr
+ expect(QA::Runtime::Logger).to have_received(:warn)
+ .with(/#{error}/)
end
end