diff --git a/app/models/mixins/retirement_mixin.rb b/app/models/mixins/retirement_mixin.rb index 56550bf56d0..69645532017 100644 --- a/app/models/mixins/retirement_mixin.rb +++ b/app/models/mixins/retirement_mixin.rb @@ -14,7 +14,7 @@ def make_retire_request(*src_ids, requester) klass = (name.demodulize + "RetireRequest").constantize options = {:src_ids => src_ids.presence, :__request_type__ => klass.request_types.first} set_retirement_requester(options[:src_ids], requester) - klass.make_request(nil, options, requester, true) + klass.make_request(nil, options, requester) end def retire(ids, options = {}) diff --git a/spec/models/service/retirement_management_spec.rb b/spec/models/service/retirement_management_spec.rb index d3817cba641..3170ca4e137 100644 --- a/spec/models/service/retirement_management_spec.rb +++ b/spec/models/service/retirement_management_spec.rb @@ -103,12 +103,12 @@ end it "with one src_id" do - expect(ServiceRetireRequest).to receive(:make_request).with(nil, {:src_ids => [@service.id], :__request_type__ => "service_retire"}, user, true) + expect(ServiceRetireRequest).to receive(:make_request).with(nil, {:src_ids => [@service.id], :__request_type__ => "service_retire"}, user) @service.class.to_s.demodulize.constantize.make_retire_request(@service.id, user) end it "with src_ids" do - expect(ServiceRetireRequest).to receive(:make_request).with(nil, {:src_ids => [@service.id, service_with_owner.id], :__request_type__ => "service_retire"}, user, true) + expect(ServiceRetireRequest).to receive(:make_request).with(nil, {:src_ids => [@service.id, service_with_owner.id], :__request_type__ => "service_retire"}, user) @service.class.to_s.demodulize.constantize.make_retire_request(@service.id, service_with_owner.id, user) end diff --git a/spec/models/vm/retirement_management_spec.rb b/spec/models/vm/retirement_management_spec.rb index b618e2cbc3b..a877d8576b7 100644 --- a/spec/models/vm/retirement_management_spec.rb +++ b/spec/models/vm/retirement_management_spec.rb @@ -106,12 +106,12 @@ describe "retire request" do it "with one src_id" do - expect(VmRetireRequest).to receive(:make_request).with(nil, {:src_ids => [@vm.id], :__request_type__ => "vm_retire"}, user, true) + expect(VmRetireRequest).to receive(:make_request).with(nil, {:src_ids => [@vm.id], :__request_type__ => "vm_retire"}, user) Vm.make_retire_request(@vm.id, user) end it "with many src_ids" do - expect(VmRetireRequest).to receive(:make_request).with(nil, {:src_ids => [@vm.id, vm2.id], :__request_type__ => "vm_retire"}, user, true) + expect(VmRetireRequest).to receive(:make_request).with(nil, {:src_ids => [@vm.id, vm2.id], :__request_type__ => "vm_retire"}, user) Vm.make_retire_request(@vm.id, vm2.id, user) end end