diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/lib/quality | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/lib/quality')
-rw-r--r-- | spec/lib/quality/test_level_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/lib/quality/test_level_spec.rb b/spec/lib/quality/test_level_spec.rb index 0b113e8b63a..0239c974755 100644 --- a/spec/lib/quality/test_level_spec.rb +++ b/spec/lib/quality/test_level_spec.rb @@ -18,6 +18,13 @@ RSpec.describe Quality::TestLevel do end end + context 'when level is frontend_fixture' do + it 'returns a pattern' do + expect(subject.pattern(:frontend_fixture)) + .to eq("spec/{frontend/fixtures}{,/**/}*.rb") + end + end + context 'when level is unit' do it 'returns a pattern' do expect(subject.pattern(:unit)) @@ -86,6 +93,13 @@ RSpec.describe Quality::TestLevel do end end + context 'when level is frontend_fixture' do + it 'returns a regexp' do + expect(subject.regexp(:frontend_fixture)) + .to eq(%r{spec/(frontend/fixtures)}) + end + end + context 'when level is unit' do it 'returns a regexp' do expect(subject.regexp(:unit)) @@ -144,6 +158,10 @@ RSpec.describe Quality::TestLevel do expect(subject.level_for('spec/models/abuse_report_spec.rb')).to eq(:unit) end + it 'returns the correct level for a frontend fixture test' do + expect(subject.level_for('spec/frontend/fixtures/pipelines.rb')).to eq(:frontend_fixture) + end + it 'returns the correct level for a tooling test' do expect(subject.level_for('spec/tooling/lib/tooling/test_file_finder_spec.rb')).to eq(:unit) end |