Skip to content

Commit

Permalink
Avoid calling MiqQueue.messaging_client and stub it as missing
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafanie committed Oct 10, 2024
1 parent 6e48815 commit a1834c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/models/ems_event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
:args => [event_hash],
}

expect(MiqQueue).to receive(:messaging_client).with('event_handler').and_return(nil)
expect(MiqQueue).to receive(:submit_job).with(expected_queue_payload)

described_class.add_queue('add', ems.id, event_hash)
Expand Down Expand Up @@ -210,6 +211,7 @@
:args => [event_hash],
}

expect(MiqQueue).to receive(:messaging_client).with('event_handler').and_return(nil)
expect(MiqQueue).to receive(:submit_job).with(expected_queue_payload)

described_class.add_queue('add', ems.id, event_hash)
Expand All @@ -228,6 +230,7 @@
:args => [event_hash],
}

expect(MiqQueue).to receive(:messaging_client).with('event_handler').and_return(nil)
expect(MiqQueue).to receive(:submit_job).with(expected_queue_payload)

described_class.add_queue('add', ems.id, event_hash)
Expand Down

0 comments on commit a1834c0

Please sign in to comment.