Skip to content

Commit

Permalink
The async deliver_* should use deliver!
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed May 15, 2024
1 parent 9beea07 commit 7c77e60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/mailers/generic_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def self.deliver_queue(method, options = {}, queue_options = {})
queue_options.reverse_merge(
:service => "notifier",
:class_name => name,
:method_name => 'deliver',
:method_name => 'deliver!',
:args => [method, options]
)
)
Expand Down
8 changes: 4 additions & 4 deletions spec/mailers/generic_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
expect(BinaryBlob.count).to eq(0)
GenericMailer.deliver_queue(:generic_notification, @args)
expect(BinaryBlob.count).to eq(1)
expect(MiqQueue.exists?(:method_name => 'deliver',
expect(MiqQueue.exists?(:method_name => 'deliver!',
:class_name => described_class.name,
:role => 'notifier')).to be_truthy
end

it "with automation_notification" do
GenericMailer.deliver_queue(:automation_notification, @args)
expect(MiqQueue.exists?(:method_name => 'deliver',
expect(MiqQueue.exists?(:method_name => 'deliver!',
:class_name => described_class.name,
:role => 'notifier')).to be_truthy
end
Expand All @@ -48,7 +48,7 @@
:message => "Queued the action: [generic_notification]"
)
expect(BinaryBlob.count).to eq(1)
expect(MiqQueue.exists?(:method_name => 'deliver',
expect(MiqQueue.exists?(:method_name => 'deliver!',
:class_name => described_class.name,
:role => 'notifier')).to be_truthy
end
Expand All @@ -60,7 +60,7 @@
:status => MiqTask::STATUS_OK,
:message => "Queued the action: [automation_notification]"
)
expect(MiqQueue.exists?(:method_name => 'deliver',
expect(MiqQueue.exists?(:method_name => 'deliver!',
:class_name => described_class.name,
:role => 'notifier')).to be_truthy
end
Expand Down

0 comments on commit 7c77e60

Please sign in to comment.