diff options
author | Robin Houston <robin@lenny.robin> | 2011-09-07 23:41:26 +0100 |
---|---|---|
committer | Robin Houston <robin@lenny.robin> | 2011-09-07 23:41:26 +0100 |
commit | 91edbbf49d717d2b559153a0bf151879f12087bc (patch) | |
tree | d68a3a2519c4059c132f04e598cf379d87f81a47 /spec/models/user_spec.rb | |
parent | cda7e0d3bd09cd6635286861fe93b8fa4ad48c7d (diff) |
Fix “email bounced” recording
Add tests for the User.record_bounce_for_email method and (not coincidentally)
make it actually work.
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r-- | spec/models/user_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index ee6916ffc..fc56d3365 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -282,3 +282,14 @@ describe User, "when setting a profile photo" do # end end +describe User, "when emails have bounced" do + fixtures :users + + it "should record bounces" do + User.record_bounce_for_email("bob@localhost", "The reason we think the email bounced (e.g. a bounce message)") + + user = User.find_user_by_email("bob@localhost") + user.email_bounced_at.should_not be_nil + user.email_bounce_message.should == "The reason we think the email bounced (e.g. a bounce message)" + end +end |