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/services/merge_requests/mergeability/detailed_merge_status_service_spec.rb')
-rw-r--r--spec/services/merge_requests/mergeability/detailed_merge_status_service_spec.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/spec/services/merge_requests/mergeability/detailed_merge_status_service_spec.rb b/spec/services/merge_requests/mergeability/detailed_merge_status_service_spec.rb
index 66bcb948cb6..a3c5427ee82 100644
--- a/spec/services/merge_requests/mergeability/detailed_merge_status_service_spec.rb
+++ b/spec/services/merge_requests/mergeability/detailed_merge_status_service_spec.rb
@@ -64,7 +64,7 @@ RSpec.describe ::MergeRequests::Mergeability::DetailedMergeStatusService, featur
merge_request.close!
end
- it 'returns the failure reason' do
+ it 'returns the failed check' do
expect(detailed_merge_status).to eq(:not_open)
end
end
@@ -77,7 +77,7 @@ RSpec.describe ::MergeRequests::Mergeability::DetailedMergeStatusService, featur
end
context 'when pipeline does not exist' do
- it 'returns the failure reason' do
+ it 'returns the failed check' do
expect(detailed_merge_status).to eq(:ci_must_pass)
end
end
@@ -97,15 +97,21 @@ RSpec.describe ::MergeRequests::Mergeability::DetailedMergeStatusService, featur
context 'when the pipeline is running' do
let(:ci_status) { :running }
- it 'returns the failure reason' do
+ it 'returns the failed check' do
expect(detailed_merge_status).to eq(:ci_still_running)
end
end
+ context 'when the pipeline is pending' do
+ let(:ci_status) { :pending }
+
+ it { expect(detailed_merge_status).to eq(:ci_still_running) }
+ end
+
context 'when the pipeline is not running' do
let(:ci_status) { :failed }
- it 'returns the failure reason' do
+ it 'returns the failed check' do
expect(detailed_merge_status).to eq(:ci_must_pass)
end
end