Skip to content

Commit

Permalink
Specs for negative case -- when there is no notifier around
Browse files Browse the repository at this point in the history
  • Loading branch information
isimluk committed May 12, 2017
1 parent f9ce522 commit fee6567
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/mailers/generic_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@
end
end

context 'without a notifier within a region' do
before { MiqRegion.seed }

it 'does not queue any mail notifications' do
@args[:attachment] = [{:content_type => "text/plain", :filename => "generic_mailer_test.txt", :body => "generic_notification with text/plain attachment" * 10}]
expect { GenericMailer.deliver_queue(:generic_notification, @args) }.not_to change { MiqQueue.count }
end
end

context "delivery error" do
it "call attempts to send message to recipients indivually" do
# generate message w/ two recipients that
Expand Down

0 comments on commit fee6567

Please sign in to comment.