diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-26 03:19:16 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-26 03:19:16 +0300 |
commit | 7d4bff6fe8d0716b9634709325e5857452b82ca5 (patch) | |
tree | 51e2a35cfb16ee1601fef39774b699653dcb2e0a /spec/tooling | |
parent | 190734a48c1030f2059035775589ee60f26bc7ca (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tooling')
-rw-r--r-- | spec/tooling/danger/stable_branch_spec.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/tooling/danger/stable_branch_spec.rb b/spec/tooling/danger/stable_branch_spec.rb index fc644413a5a..439a878a5e6 100644 --- a/spec/tooling/danger/stable_branch_spec.rb +++ b/spec/tooling/danger/stable_branch_spec.rb @@ -241,13 +241,23 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do context 'when not an applicable version' do let(:target_branch) { '14-9-stable-ee' } - it_behaves_like 'with a warning', described_class::VERSION_WARNING_MESSAGE + it 'warns about the package-and-test pipeline and the version' do + expect(stable_branch).to receive(:warn).with(described_class::WARN_PACKAGE_AND_TEST_MESSAGE) + expect(stable_branch).to receive(:warn).with(described_class::VERSION_WARNING_MESSAGE) + + subject + end end context 'when the version API request fails' do let(:response_success) { false } - it_behaves_like 'with a warning', described_class::FAILED_VERSION_REQUEST_MESSAGE + it 'warns about the package-and-test pipeline and the version request' do + expect(stable_branch).to receive(:warn).with(described_class::WARN_PACKAGE_AND_TEST_MESSAGE) + expect(stable_branch).to receive(:warn).with(described_class::FAILED_VERSION_REQUEST_MESSAGE) + + subject + end end context 'when more than one page of versions is needed' do @@ -293,6 +303,7 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do it 'adds a warning' do expect(HTTParty).to receive(:get).and_return(version_response).at_least(10).times + expect(stable_branch).to receive(:warn).with(described_class::WARN_PACKAGE_AND_TEST_MESSAGE) expect(stable_branch).to receive(:warn).with(described_class::FAILED_VERSION_REQUEST_MESSAGE) subject |