omarzina / substruct

Automatically exported from code.google.com/p/substruct
0 stars 0 forks source link

No great way to test emails #134

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set up a new store
2. How do you know email notifications are working properly?

What is the expected output? What do you see instead?
Perhaps a nice UI should be offered to send a test mail and debug what's going 
on.

Original issue reported on code.google.com by subim...@gmail.com on 20 Sep 2008 at 12:52

GoogleCodeExporter commented 8 years ago
Doing a test? This is the way I did at least.

  def test_receipt_not_using_authentication
    ActionMailer::Base.delivery_method = :smtp

    prefs = {
      "mail_host" => "xxx.xxx.xxx.xxx",
      "mail_port" => "25",
      "mail_auth_type" => "none",
      "mail_username" => "system@domain",
      "use_smtp_tls_patch" => "0"
    }

    assert Preference.save_settings(prefs)
    assert Preference.init_mail_settings

    an_order_user = order_users(:santa)
    assert an_order_user.update_attributes(:email_address => 'customer@domain')

    # Get any order.
    an_order = orders(:santa_next_christmas_order)

    an_order.deliver_receipt
  end

Original comment by edmundo...@gmail.com on 20 Sep 2008 at 9:08

GoogleCodeExporter commented 8 years ago
Edmundo - a test from the user interface. So that store owners can ensure that 
their mail settings are working 
properly.

Original comment by subim...@gmail.com on 21 Sep 2008 at 7:46

GoogleCodeExporter commented 8 years ago
needed one of these, so commited one, revision 180.

Original comment by rogerdp...@gmail.com on 12 Sep 2009 at 6:45