Skip to content

Commit

Permalink
Add notifier role to miq_server so the email task gets queued
Browse files Browse the repository at this point in the history
Fix test after changes from PR ManageIQ/manageiq#14801
  • Loading branch information
gmcculloug committed May 18, 2017
1 parent 45ed82a commit 8d7720d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def invoke_ae
end

it "sends mail asynchronous" do
miq_server = EvmSpecHelper.local_miq_server
MiqRegion.seed
miq_server.server_roles << FactoryGirl.create(:server_role, :name => 'notifier')

method = "$evm.root['#{@ae_result_key}'] = $evm.execute(:send_email, #{options[:to].inspect}, #{options[:from].inspect}, #{options[:subject].inspect}, #{options[:body].inspect}, #{options[:content_type].inspect})"
@ae_method.update_attributes(:data => method)
stub_const('MiqAeMethodService::MiqAeServiceMethods::SYNCHRONOUS', false)
Expand Down

0 comments on commit 8d7720d

Please sign in to comment.