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>2021-04-29 21:10:23 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-29 21:10:23 +0300
commit71dc16a12c2b0aaeee3a8fa55aa1ca880f5699b4 (patch)
tree1d6f3ebbcc4e0d799c2d55a3af7dc933cb8a829a /spec/lib/gitlab/data_builder
parentc5e4f06c597e7ef9b584595a55a82cb221804e4b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/data_builder')
-rw-r--r--spec/lib/gitlab/data_builder/deployment_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/lib/gitlab/data_builder/deployment_spec.rb b/spec/lib/gitlab/data_builder/deployment_spec.rb
index 8fb7ab25b17..d64dfc957ca 100644
--- a/spec/lib/gitlab/data_builder/deployment_spec.rb
+++ b/spec/lib/gitlab/data_builder/deployment_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Gitlab::DataBuilder::Deployment do
it 'returns the object kind for a deployment' do
deployment = build(:deployment, deployable: nil, environment: create(:environment))
- data = described_class.build(deployment)
+ data = described_class.build(deployment, Time.current)
expect(data[:object_kind]).to eq('deployment')
end
@@ -21,10 +21,12 @@ RSpec.describe Gitlab::DataBuilder::Deployment do
expected_deployable_url = Gitlab::Routing.url_helpers.project_job_url(deployable.project, deployable)
expected_user_url = Gitlab::Routing.url_helpers.user_url(deployment.deployed_by)
expected_commit_url = Gitlab::UrlBuilder.build(commit)
+ status_changed_at = Time.current
- data = described_class.build(deployment)
+ data = described_class.build(deployment, status_changed_at)
expect(data[:status]).to eq('failed')
+ expect(data[:status_changed_at]).to eq(status_changed_at)
expect(data[:deployable_id]).to eq(deployable.id)
expect(data[:deployable_url]).to eq(expected_deployable_url)
expect(data[:environment]).to eq("somewhere")
@@ -38,7 +40,7 @@ RSpec.describe Gitlab::DataBuilder::Deployment do
it 'does not include the deployable URL when there is no deployable' do
deployment = create(:deployment, status: :failed, deployable: nil)
- data = described_class.build(deployment)
+ data = described_class.build(deployment, Time.current)
expect(data[:deployable_url]).to be_nil
end