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 'spec/controllers/projects/pipelines/tests_controller_spec.rb')
-rw-r--r--spec/controllers/projects/pipelines/tests_controller_spec.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/controllers/projects/pipelines/tests_controller_spec.rb b/spec/controllers/projects/pipelines/tests_controller_spec.rb
index 2db54dbe671..deb96cc5bf9 100644
--- a/spec/controllers/projects/pipelines/tests_controller_spec.rb
+++ b/spec/controllers/projects/pipelines/tests_controller_spec.rb
@@ -45,6 +45,21 @@ RSpec.describe Projects::Pipelines::TestsController do
pipeline.job_artifacts.first.update!(expire_at: Date.yesterday)
end
+ it 'renders test suite', :aggregate_failures do
+ get_tests_show_json(build_ids)
+
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(json_response['name']).to eq('test')
+ expect(json_response['total_count']).to eq(3)
+ expect(json_response['test_cases'].size).to eq(3)
+ end
+ end
+
+ context 'when artifacts do not exist' do
+ before do
+ pipeline.job_artifacts.each(&:destroy)
+ end
+
it 'renders not_found errors', :aggregate_failures do
get_tests_show_json(build_ids)
@@ -68,7 +83,6 @@ RSpec.describe Projects::Pipelines::TestsController do
expect(response).to have_gitlab_http_status(:ok)
expect(json_response['name']).to eq('test')
- expect(json_response['artifacts_expired']).to be_falsey
# Each test failure in this pipeline has a matching failure in the default branch
recent_failures = json_response['test_cases'].map { |tc| tc['recent_failures'] }