Commit Graph

30 Commits

Author SHA1 Message Date
Xavier Noria
b91ff557ef applies new string literal convention in actionmailer/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:03:39 +02:00
yuuji.yaginuma
49a59cc6a5 assert_emails in block form use the given number as expected value 2015-05-09 18:59:59 +09:00
Aditya Kapoor
7b58423251 remove noise from AM tests 2015-02-07 13:38:18 +05:30
Vipul A M
6eced6a1fe Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 onwards. 2015-02-03 20:51:40 +05:30
George Claghorn
3f17fbd68d Add assert_enqueued_emails and assert_no_enqueued_emails 2015-01-08 09:41:22 -05:00
Cristian Bica
f4ee114746 Deprecated .deliver / .deliver! to .deliver_now / .deliver_now! 2014-08-20 17:48:34 +03:00
Dmitry Polushkin
99f8d4feeb add test coverage for the action mailer 2014-07-04 15:55:33 +01:00
Kirill Nikitin
96f290eac0 Update actionmailer with new hash syntax. 2012-10-07 21:54:14 +04:00
José Valim
972efa11fd Deprecate the old mailer API that was not deprecated yet. 2010-08-29 20:42:13 -03:00
Santiago Pastorino
b451de0d6d Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) 2010-08-14 04:12:33 -03:00
Neeraj Singh
b462952886 Use better assertion methods for testing
[#4645 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-19 10:18:36 +02:00
Mikel Lindsaar
fd9ee49f38 Moved test of QP into mail 2010-04-11 18:04:56 +10:00
Mikel Lindsaar
dbcf01e631 Removing quoting.rb, upgrade to 2.1.3.6, changing all utf-8 references to UTF-8, updating tests where incorrect encoding 2010-04-11 18:04:55 +10:00
José Valim and Mikel Lindsaar
f30d73bab4 Add new class delivery method API. 2010-01-24 17:31:18 +01:00
Mikel Lindsaar
0750304c01 Migrated over to Mail doing delivery. 2010-01-16 14:02:55 +01:00
Mikel Lindsaar
bf6d0e2bc2 Updating to Mail 1.5.0, including default values for all Message#field_name methods, can access field objects by calling Message#[:field_name] 2010-01-02 22:39:00 -08:00
José Valim
4747a9a57e Getting rid of some warnings in AM suite. 2009-12-27 12:18:46 +01:00
Mikel Lindsaar
747d56881a 131 tests, 309 assertions, 0 failures, 0 errors 2009-11-22 23:20:57 +11:00
Mikel Lindsaar
15d7cac282 Starting again on actionmailer integration with mail 2009-11-12 16:08:50 +11:00
José Valim
e9667ad1f0 Make tests run without deprecation warning (just one left). 2009-11-01 02:23:48 +01:00
Matthew Rudy Jacobs
f4f76772fb abstract all of the ActionMailer delivery methods into their own classes. thereby the following are equivalent
ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.delivery_method = ActionMailer::DeliveryMethod::Smtp

we could equally set our own custom object
as long as it provides the instance method :perform_delivery(mail)

eg.

  class MySmsDeliveryMethod
    def perform_delivery(mail)
      Sms.send(mail['to'], mail['body'])
    end
  end

  MySmsMailer.delivery_method = MySmsDeliveryMethod.new

Signed-off-by: José Valim <jose.valim@gmail.com>
2009-11-01 02:23:47 +01:00
Jeremy Kemper
1c36172c13 Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.
[#1617 state:resolved]
2009-03-08 13:11:58 -07:00
Alexey Mahotkin
84583657f4 Fixed RFC-2045 quoted-printable bug [#1421 state:committed]
http://www.faqs.org/rfcs/rfc2045.html says:

          may be
          represented by an "=" followed by a two digit
          hexadecimal representation of the octet's value.  The
          digits of the hexadecimal alphabet, for this purpose,
          are "0123456789ABCDEF".  Uppercase letters must be
          used; lowercase letters are not allowed.

ActionMailer, however, used "=%02x" specification.

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-20 23:10:15 +01:00
Jeremy Kemper
17ac2a2482 Ruby 1.9 compat: check for minitest's assertion also 2008-11-08 22:49:28 -05:00
Jeremy Kemper
139b92495f * Continue evolution toward ActiveSupport::TestCase and friends. #10679 [Josh Peek]
* TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse.  [Jeremy Kemper]


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:34:15 +00:00
Jeremy Kemper
1ad87adc9f require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8565 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:22 +00:00
David Heinemeier Hansson
6a6367d7d2 Fixed that you don't have to call super in ActionMailer::TestCase#setup (closes #10406) [jamesgolick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8536 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 00:40:28 +00:00
Michael Koziarski
2cc0cac3ef Introduce TestCase subclasses for testing rails applications allowing tests to be DRY'd up a bit and to provide a path toward tidying up our monkeypatching of test/unit.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-26 02:21:21 +00:00
Jeremy Kemper
e963354124 Increase mail delivery test coverage. Closes #8692.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7070 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-20 06:50:43 +00:00
Jeremy Kemper
ba553f9424 Add assert_emails and assert_no_emails to test the number of emails delivered. Closes #6479.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-05 21:56:18 +00:00