spec/integration/mailgun_spec.rb in mailgun-ruby-1.2.4 vs spec/integration/mailgun_spec.rb in mailgun-ruby-1.2.5

- old
+ new

@@ -61,19 +61,22 @@ data = { :from => "joe@#{@domain}", :to => "bob@#{@domain}", :subject => "Test", :text => "Test Data" } + uuid = 'uuid' + allow(SecureRandom).to receive(:uuid).and_return(uuid) + result = @mg_obj.send_message(@domain, data) result.to_h! expect(result.body).to include("message") expect(result.body).to include("id") expect(result.code).to eq(200) - expect(result.body['id']).to eq("test-mode-mail@localhost") + expect(result.body['id']).to eq("test-mode-mail-#{uuid}@localhost") expect(result.body['message']).to eq("Queued. Thank you.") end it 'sends a message builder message in test mode.' do mb_obj = Mailgun::MessageBuilder.new()