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/models/deployment_spec.rb')
-rw-r--r--spec/models/deployment_spec.rb24
1 files changed, 11 insertions, 13 deletions
diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb
index 46a1b4ce588..2a7a8d50895 100644
--- a/spec/models/deployment_spec.rb
+++ b/spec/models/deployment_spec.rb
@@ -170,13 +170,6 @@ RSpec.describe Deployment, feature_category: :continuous_delivery do
deployment.run!
end
end
-
- it 'does not execute Deployments::DropOlderDeploymentsWorker' do
- expect(Deployments::DropOlderDeploymentsWorker)
- .not_to receive(:perform_async).with(deployment.id)
-
- deployment.run!
- end
end
context 'when deployment succeeded' do
@@ -383,8 +376,14 @@ RSpec.describe Deployment, feature_category: :continuous_delivery do
let_it_be(:commits) { project.repository.commits('master', limit: 2) }
let!(:deployment) do
- create(:deployment, :success, project: project, environment: environment,
- finished_at: 1.year.ago, sha: commits[0].sha)
+ create(
+ :deployment,
+ :success,
+ project: project,
+ environment: environment,
+ finished_at: 1.year.ago,
+ sha: commits[0].sha
+ )
end
let!(:last_deployment) do
@@ -1355,10 +1354,9 @@ RSpec.describe Deployment, feature_category: :continuous_delivery do
subject { deployment.tags }
it 'will return tags related to this deployment' do
- expect(project.repository).to receive(:refs_by_oid).with(oid: deployment.sha,
- limit: 100,
- ref_patterns: [Gitlab::Git::TAG_REF_PREFIX])
- .and_return(["#{Gitlab::Git::TAG_REF_PREFIX}test"])
+ expect(project.repository).to receive(:refs_by_oid).with(
+ oid: deployment.sha, limit: 100, ref_patterns: [Gitlab::Git::TAG_REF_PREFIX]
+ ).and_return(["#{Gitlab::Git::TAG_REF_PREFIX}test"])
is_expected.to match_array(['refs/tags/test'])
end