Ruby on Rails
Monday, January 5, 2015
No one has an idea?
Am Sonntag, 28. Dezember 2014 20:35:06 UTC+1 schrieb Philipp Näö:
-- Am Sonntag, 28. Dezember 2014 20:35:06 UTC+1 schrieb Philipp Näö:
Since we updated our application to Rails 4.2, our mailer tests seems to fail (or not) randomly.
Simplified mailer code:class ReservationMailer < ActionMailer::BaseSimplified test code:
default from: 'no-reply@1.de',
bcc: 'kopie@1.de'
def reservation_received(reservation)
@reservation = reservation
@product = reservation.product
mail to: @reservation.email,
from: 'no-reply@1.de',
subject: "Bestätigung Eingang Vormerkung für Produkt #{@product.name}"
end
endreservation = Reservation.new(email: 'max@mustermann.com', product: product)There are some more mailers very similar to this mailer and the tests seem to fail randomly.
email = ReservationMailer.reservation_received(reservation).deliver_ now
assert_equal 1, ActionMailer::Base.deliveries.size
That means, sometimes just one of these tests fail, sometimes two and somewhen nothing fails.
I couldn't figure out any problem, but maybe you can help me out :)
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/33d4469b-b155-4f55-b3c6-dc2650227a1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment