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:
authorKamil Trzciński (OoO till 3th) <ayufan@ayufan.eu>2018-07-04 12:17:42 +0300
committerKamil Trzciński (OoO till 3th) <ayufan@ayufan.eu>2018-07-04 12:17:42 +0300
commit391710f29d1e82dafb3244691d541573a21acda2 (patch)
tree765a5c3ea38387222e81cefbaf1fbe141ef57281 /spec/controllers
parent5714e57b1338ed2b1893b85d31e6119102de1859 (diff)
parent1d3dbe461283a75d91029bd4ab276284cdef1be0 (diff)
Merge branch '47040-inconsistent-job-list-in-job-details-view' into 'master'
Resolve "Inconsistent job list in job details view" Closes #47040 See merge request gitlab-org/gitlab-ce!20243
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/jobs_controller_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/controllers/projects/jobs_controller_spec.rb b/spec/controllers/projects/jobs_controller_spec.rb
index 06c8a432561..b10421b8f26 100644
--- a/spec/controllers/projects/jobs_controller_spec.rb
+++ b/spec/controllers/projects/jobs_controller_spec.rb
@@ -102,6 +102,8 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
describe 'GET show' do
let!(:job) { create(:ci_build, :failed, pipeline: pipeline) }
+ let!(:second_job) { create(:ci_build, :failed, pipeline: pipeline) }
+ let!(:third_job) { create(:ci_build, :failed) }
context 'when requesting HTML' do
context 'when job exists' do
@@ -113,6 +115,13 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
expect(response).to have_gitlab_http_status(:ok)
expect(assigns(:build).id).to eq(job.id)
end
+
+ it 'has the correct build collection' do
+ builds = assigns(:builds).map(&:id)
+
+ expect(builds).to include(job.id, second_job.id)
+ expect(builds).not_to include(third_job.id)
+ end
end
context 'when job does not exist' do