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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-06-20 13:43:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-20 13:43:29 +0300
commit3b1af5cc7ed2666ff18b718ce5d30fa5a2756674 (patch)
tree3bc4a40e0ee51ec27eabf917c537033c0c5b14d4 /spec/lib/gitlab/ci/status
parent9bba14be3f2c211bf79e15769cd9b77bc73a13bc (diff)
Add latest changes from gitlab-org/gitlab@16-1-stable-eev16.1.0-rc42
Diffstat (limited to 'spec/lib/gitlab/ci/status')
-rw-r--r--spec/lib/gitlab/ci/status/build/factory_spec.rb2
-rw-r--r--spec/lib/gitlab/ci/status/build/waiting_for_approval_spec.rb72
-rw-r--r--spec/lib/gitlab/ci/status/scheduled_spec.rb6
-rw-r--r--spec/lib/gitlab/ci/status/success_warning_spec.rb4
4 files changed, 6 insertions, 78 deletions
diff --git a/spec/lib/gitlab/ci/status/build/factory_spec.rb b/spec/lib/gitlab/ci/status/build/factory_spec.rb
index 21eca97331e..f71f3d47452 100644
--- a/spec/lib/gitlab/ci/status/build/factory_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/factory_spec.rb
@@ -370,7 +370,7 @@ RSpec.describe Gitlab::Ci::Status::Build::Factory do
end
it 'fabricates status with correct details' do
- expect(status.text).to eq s_('CiStatusText|delayed')
+ expect(status.text).to eq s_('CiStatusText|scheduled')
expect(status.group).to eq 'scheduled'
expect(status.icon).to eq 'status_scheduled'
expect(status.favicon).to eq 'favicon_status_scheduled'
diff --git a/spec/lib/gitlab/ci/status/build/waiting_for_approval_spec.rb b/spec/lib/gitlab/ci/status/build/waiting_for_approval_spec.rb
deleted file mode 100644
index b79b78d911b..00000000000
--- a/spec/lib/gitlab/ci/status/build/waiting_for_approval_spec.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe Gitlab::Ci::Status::Build::WaitingForApproval do
- let_it_be(:project) { create(:project, :repository) }
- let_it_be(:user) { create(:user) }
- let_it_be(:build) { create(:ci_build, :manual, environment: 'production', project: project) }
-
- subject { described_class.new(Gitlab::Ci::Status::Core.new(build, user)) }
-
- describe '.matches?' do
- subject { described_class.matches?(build, user) }
-
- let(:build) { create(:ci_build, :manual, environment: 'production', project: project) }
-
- before do
- create(:deployment, deployment_status, deployable: build, project: project)
- end
-
- context 'when build is waiting for approval' do
- let(:deployment_status) { :blocked }
-
- it 'is a correct match' do
- expect(subject).to be_truthy
- end
- end
-
- context 'when build is not waiting for approval' do
- let(:deployment_status) { :created }
-
- it 'does not match' do
- expect(subject).to be_falsey
- end
- end
- end
-
- describe '#illustration' do
- before do
- environment = create(:environment, name: 'production', project: project)
- create(:deployment, :blocked, project: project, environment: environment, deployable: build)
- end
-
- it { expect(subject.illustration).to include(:image, :size) }
- it { expect(subject.illustration[:title]).to eq('Waiting for approval') }
- it { expect(subject.illustration[:content]).to include('This job deploys to the protected environment "production"') }
- end
-
- describe '#has_action?' do
- it { expect(subject.has_action?).to be_truthy }
- end
-
- describe '#action_icon' do
- it { expect(subject.action_icon).to be_nil }
- end
-
- describe '#action_title' do
- it { expect(subject.action_title).to be_nil }
- end
-
- describe '#action_button_title' do
- it { expect(subject.action_button_title).to eq('Go to environments page to approve or reject') }
- end
-
- describe '#action_path' do
- it { expect(subject.action_path).to include('environments') }
- end
-
- describe '#action_method' do
- it { expect(subject.action_method).to eq(:get) }
- end
-end
diff --git a/spec/lib/gitlab/ci/status/scheduled_spec.rb b/spec/lib/gitlab/ci/status/scheduled_spec.rb
index 8a923faf3f9..df72455d3c1 100644
--- a/spec/lib/gitlab/ci/status/scheduled_spec.rb
+++ b/spec/lib/gitlab/ci/status/scheduled_spec.rb
@@ -2,17 +2,17 @@
require 'spec_helper'
-RSpec.describe Gitlab::Ci::Status::Scheduled do
+RSpec.describe Gitlab::Ci::Status::Scheduled, feature_category: :continuous_integration do
subject do
described_class.new(double('subject'), double('user'))
end
describe '#text' do
- it { expect(subject.text).to eq 'delayed' }
+ it { expect(subject.text).to eq 'scheduled' }
end
describe '#label' do
- it { expect(subject.label).to eq 'delayed' }
+ it { expect(subject.label).to eq 'scheduled' }
end
describe '#icon' do
diff --git a/spec/lib/gitlab/ci/status/success_warning_spec.rb b/spec/lib/gitlab/ci/status/success_warning_spec.rb
index 86b826ad272..1725f90a0cf 100644
--- a/spec/lib/gitlab/ci/status/success_warning_spec.rb
+++ b/spec/lib/gitlab/ci/status/success_warning_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Ci::Status::SuccessWarning do
+RSpec.describe Gitlab::Ci::Status::SuccessWarning, feature_category: :continuous_integration do
let(:status) { double('status') }
subject do
@@ -10,7 +10,7 @@ RSpec.describe Gitlab::Ci::Status::SuccessWarning do
end
describe '#test' do
- it { expect(subject.text).to eq 'passed' }
+ it { expect(subject.text).to eq 'warning' }
end
describe '#label' do