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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-03 15:09:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-03 15:09:07 +0300
commitc089cf73c2f1835dc68fd6107d6cbd10fc17f365 (patch)
treeb91f11ed13f00c84ee69e03150d00426279911ef /spec
parentf14507e586a7f75f0fb71a1d8468b7361be860d4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/projects/pipelines/charts/components/app_spec.js4
-rw-r--r--spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js2
-rw-r--r--spec/lib/gitlab/safe_request_store_spec.rb4
-rw-r--r--spec/services/ci/create_pipeline_service/rules_spec.rb19
-rw-r--r--spec/spec_helper.rb6
5 files changed, 8 insertions, 27 deletions
diff --git a/spec/frontend/projects/pipelines/charts/components/app_spec.js b/spec/frontend/projects/pipelines/charts/components/app_spec.js
index 48ea333e2c3..8aeeb4d5d7d 100644
--- a/spec/frontend/projects/pipelines/charts/components/app_spec.js
+++ b/spec/frontend/projects/pipelines/charts/components/app_spec.js
@@ -1,7 +1,7 @@
import { shallowMount } from '@vue/test-utils';
import { GlColumnChart } from '@gitlab/ui/dist/charts';
-import Component from '~/projects/pipelines/charts/components/app';
-import StatisticsList from '~/projects/pipelines/charts/components/statistics_list';
+import Component from '~/projects/pipelines/charts/components/app.vue';
+import StatisticsList from '~/projects/pipelines/charts/components/statistics_list.vue';
import { counts, timesChartData } from '../mock_data';
describe('ProjectsPipelinesChartsApp', () => {
diff --git a/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js b/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js
index 93130f22407..f78608e9cb2 100644
--- a/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js
+++ b/spec/frontend/projects/pipelines/charts/components/statistics_list_spec.js
@@ -1,5 +1,5 @@
import { shallowMount } from '@vue/test-utils';
-import Component from '~/projects/pipelines/charts/components/statistics_list';
+import Component from '~/projects/pipelines/charts/components/statistics_list.vue';
import { counts } from '../mock_data';
describe('StatisticsList', () => {
diff --git a/spec/lib/gitlab/safe_request_store_spec.rb b/spec/lib/gitlab/safe_request_store_spec.rb
index bae87e43615..def05a3f285 100644
--- a/spec/lib/gitlab/safe_request_store_spec.rb
+++ b/spec/lib/gitlab/safe_request_store_spec.rb
@@ -38,7 +38,7 @@ describe Gitlab::SafeRequestStore do
describe '.clear!' do
context 'when RequestStore is active', :request_store do
it 'uses RequestStore' do
- expect(RequestStore).to receive(:clear!).twice.and_call_original
+ expect(RequestStore).to receive(:clear!).once.and_call_original
described_class.clear!
end
@@ -56,7 +56,7 @@ describe Gitlab::SafeRequestStore do
describe '.end!' do
context 'when RequestStore is active', :request_store do
it 'uses RequestStore' do
- expect(RequestStore).to receive(:end!).twice.and_call_original
+ expect(RequestStore).to receive(:end!).once.and_call_original
described_class.end!
end
diff --git a/spec/services/ci/create_pipeline_service/rules_spec.rb b/spec/services/ci/create_pipeline_service/rules_spec.rb
index 0a2c5724ce4..713d230731b 100644
--- a/spec/services/ci/create_pipeline_service/rules_spec.rb
+++ b/spec/services/ci/create_pipeline_service/rules_spec.rb
@@ -100,17 +100,6 @@ describe Ci::CreatePipelineService do
stub_ci_pipeline_yaml_file(config)
end
- shared_examples 'workflow:rules feature disabled' do
- before do
- stub_feature_flags(workflow_rules: false)
- end
-
- it 'presents a message that rules are disabled' do
- expect(pipeline.errors[:base]).to include('Workflow rules are disabled')
- expect(pipeline).to be_persisted
- end
- end
-
context 'with a single regex-matching if: clause' do
let(:config) do
<<-EOY
@@ -241,8 +230,6 @@ describe Ci::CreatePipelineService do
expect(pipeline.errors[:base]).to include('No stages / jobs for this pipeline.')
expect(pipeline).not_to be_persisted
end
-
- it_behaves_like 'workflow:rules feature disabled'
end
context 'where workflow passes and the job passes' do
@@ -252,8 +239,6 @@ describe Ci::CreatePipelineService do
expect(pipeline).to be_pending
expect(pipeline).to be_persisted
end
-
- it_behaves_like 'workflow:rules feature disabled'
end
context 'where workflow fails and the job fails' do
@@ -263,8 +248,6 @@ describe Ci::CreatePipelineService do
expect(pipeline.errors[:base]).to include('Pipeline filtered out by workflow rules.')
expect(pipeline).not_to be_persisted
end
-
- it_behaves_like 'workflow:rules feature disabled'
end
context 'where workflow fails and the job passes' do
@@ -274,8 +257,6 @@ describe Ci::CreatePipelineService do
expect(pipeline.errors[:base]).to include('Pipeline filtered out by workflow rules.')
expect(pipeline).not_to be_persisted
end
-
- it_behaves_like 'workflow:rules feature disabled'
end
end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 6393e482904..32eeeb5dfb4 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -208,11 +208,11 @@ RSpec.configure do |config|
example.run if config.inclusion_filter[:quarantine]
end
- config.before(:example, :request_store) do
+ config.around(:example, :request_store) do |example|
RequestStore.begin!
- end
- config.after(:example, :request_store) do
+ example.run
+
RequestStore.end!
RequestStore.clear!
end