summaryrefslogtreecommitdiff
path: root/spec/models/deployment_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/deployment_spec.rb')
-rw-r--r--spec/models/deployment_spec.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb
index f0fdc62e6c7..46a1b4ce588 100644
--- a/spec/models/deployment_spec.rb
+++ b/spec/models/deployment_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Deployment do
+RSpec.describe Deployment, feature_category: :continuous_delivery do
subject { build(:deployment) }
it { is_expected.to belong_to(:project).required }
@@ -164,7 +164,8 @@ RSpec.describe Deployment do
freeze_time do
expect(Deployments::HooksWorker)
.to receive(:perform_async)
- .with(deployment_id: deployment.id, status: 'running', status_changed_at: Time.current)
+ .with(hash_including({ 'deployment_id' => deployment.id, 'status' => 'running',
+ 'status_changed_at' => Time.current.to_s }))
deployment.run!
end
@@ -200,8 +201,9 @@ RSpec.describe Deployment do
it 'executes Deployments::HooksWorker asynchronously' do
freeze_time do
expect(Deployments::HooksWorker)
- .to receive(:perform_async)
- .with(deployment_id: deployment.id, status: 'success', status_changed_at: Time.current)
+ .to receive(:perform_async)
+ .with(hash_including({ 'deployment_id' => deployment.id, 'status' => 'success',
+ 'status_changed_at' => Time.current.to_s }))
deployment.succeed!
end
@@ -231,7 +233,8 @@ RSpec.describe Deployment do
freeze_time do
expect(Deployments::HooksWorker)
.to receive(:perform_async)
- .with(deployment_id: deployment.id, status: 'failed', status_changed_at: Time.current)
+ .with(hash_including({ 'deployment_id' => deployment.id, 'status' => 'failed',
+ 'status_changed_at' => Time.current.to_s }))
deployment.drop!
end
@@ -261,8 +264,8 @@ RSpec.describe Deployment do
freeze_time do
expect(Deployments::HooksWorker)
.to receive(:perform_async)
- .with(deployment_id: deployment.id, status: 'canceled', status_changed_at: Time.current)
-
+ .with(hash_including({ 'deployment_id' => deployment.id, 'status' => 'canceled',
+ 'status_changed_at' => Time.current.to_s }))
deployment.cancel!
end
end