summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-08-08 19:27:25 +0900
committerShinya Maeda <shinya@gitlab.com>2018-08-08 19:27:25 +0900
commit473edcf4e60200c5ec9f6b92907d4badcf9c6a94 (patch)
treea7067c3ddda314e0b56ab8e7279c76b4c81acfc6
parentfa2d4f76235c8aa19de9712288f5c225c47ea5f0 (diff)
downloadgitlab-ce-473edcf4e60200c5ec9f6b92907d4badcf9c6a94.tar.gz
Fix specs
-rw-r--r--spec/features/merge_request/user_sees_merge_widget_spec.rb2
-rw-r--r--spec/models/ci/build_spec.rb4
-rw-r--r--spec/models/ci/job_artifact_spec.rb2
-rw-r--r--spec/models/ci/pipeline_spec.rb2
-rw-r--r--spec/services/ci/compare_test_reports_service_spec.rb2
5 files changed, 6 insertions, 6 deletions
diff --git a/spec/features/merge_request/user_sees_merge_widget_spec.rb b/spec/features/merge_request/user_sees_merge_widget_spec.rb
index b285cd7a7ac..423925a4822 100644
--- a/spec/features/merge_request/user_sees_merge_widget_spec.rb
+++ b/spec/features/merge_request/user_sees_merge_widget_spec.rb
@@ -370,7 +370,7 @@ describe 'Merge request > User sees merge widget', :js do
end
context 'when JUnit xml is corrupted' do
- let!(:job_artifact) { create(:ci_job_artifact, :junit_with_corrupted_data, job: build, project: project) }
+ let!(:job_artifact) { create(:ci_job_artifact, :junit, file: 'junit_with_corrupted_data.xml.gz', job: build, project: project) }
before do
allow_any_instance_of(MergeRequest).to receive(:compare_test_reports).and_return(compared_data)
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 32b8755ee9a..2682b5d4771 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -2820,7 +2820,7 @@ describe Ci::Build do
context 'when there is a JUnit test report from java ant test suite' do
before do
- create(:ci_job_artifact, :junit_with_ant, job: build, project: build.project)
+ create(:ci_job_artifact, :junit, file: 'junit_ant.xml.gz', job: build, project: build.project)
end
it 'parses blobs and add the results to the test suite' do
@@ -2834,7 +2834,7 @@ describe Ci::Build do
context 'when there is a corrupted JUnit test report' do
before do
- create(:ci_job_artifact, :junit_with_corrupted_data, job: build, project: build.project)
+ create(:ci_job_artifact, :junit, file: 'junit_with_corrupted_data.xml.gz', job: build, project: build.project)
end
it 'raises an error' do
diff --git a/spec/models/ci/job_artifact_spec.rb b/spec/models/ci/job_artifact_spec.rb
index 1bf338f4c70..19ecbf643f7 100644
--- a/spec/models/ci/job_artifact_spec.rb
+++ b/spec/models/ci/job_artifact_spec.rb
@@ -158,7 +158,7 @@ describe Ci::JobArtifact do
end
context 'when gzip file contains three files' do
- let(:artifact) { build(:ci_job_artifact, :junit_with_three_testsuites) }
+ let(:artifact) { build(:ci_job_artifact, :junit, file: 'junit_with_three_testsuites.xml.gz') }
it 'iterates blob three times' do
expect { |b| artifact.each_blob(&b) }.to yield_control.exactly(3).times
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index 77b7332a761..ba7e32e776a 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -1902,7 +1902,7 @@ describe Ci::Pipeline, :mailer do
before do
create(:ci_job_artifact, :junit, job: build_rspec, project: project)
- create(:ci_job_artifact, :junit_with_ant, job: build_java, project: project)
+ create(:ci_job_artifact, :junit, file: 'junit_ant.xml.gz', job: build_java, project: project)
end
it 'returns test reports with collected data' do
diff --git a/spec/services/ci/compare_test_reports_service_spec.rb b/spec/services/ci/compare_test_reports_service_spec.rb
index a26c970a8f0..5eba9d32c61 100644
--- a/spec/services/ci/compare_test_reports_service_spec.rb
+++ b/spec/services/ci/compare_test_reports_service_spec.rb
@@ -33,7 +33,7 @@ describe Ci::CompareTestReportsService do
before do
build = create(:ci_build, pipeline: head_pipeline, project: head_pipeline.project)
- create(:ci_job_artifact, :junit_with_corrupted_data, job: build, project: project)
+ create(:ci_job_artifact, :junit, file: 'junit_with_corrupted_data.xml.gz', job: build, project: project)
end
it 'returns status and error message' do