summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-05-05 18:01:33 +0200
committerJames Lopez <james@jameslopez.es>2017-05-05 18:01:33 +0200
commit6ecf16b8f70335e1e6868b7c918cd031f5eb2f8d (patch)
treee57683de43fa63c278929bcba679d1077906a2fe /spec/controllers
parentce418036c763219df8239632f71ef0e9782be7ea (diff)
downloadgitlab-ce-6ecf16b8f70335e1e6868b7c918cd031f5eb2f8d.tar.gz
refactor code based on feedback
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/admin/services_controller_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/admin/services_controller_spec.rb b/spec/controllers/admin/services_controller_spec.rb
index 808c98edb7f..c94616d8508 100644
--- a/spec/controllers/admin/services_controller_spec.rb
+++ b/spec/controllers/admin/services_controller_spec.rb
@@ -39,16 +39,16 @@ describe Admin::ServicesController do
)
end
- it 'updates the service params successfully and calls the propagation worker' do
- expect(PropagateProjectServiceWorker).to receive(:perform_async).with(service.id)
+ it 'calls the propagation worker when service is active' do
+ expect(PropagateServiceTemplateWorker).to receive(:perform_async).with(service.id)
put :update, id: service.id, service: { active: true }
expect(response).to have_http_status(302)
end
- it 'updates the service params successfully' do
- expect(PropagateProjectServiceWorker).not_to receive(:perform_async)
+ it 'does not call the propagation worker when service is not active' do
+ expect(PropagateServiceTemplateWorker).not_to receive(:perform_async)
put :update, id: service.id, service: { properties: {} }