aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/user_controller_spec.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-29 18:49:26 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-29 18:49:26 +1100
commit97c4683e47bdbac4d170780cf2b765940fcd0168 (patch)
treedb2d850f71fcddf086ded2b9ae5455d34158463a /spec/controllers/user_controller_spec.rb
parent0925f8b6ddd30f6edc19741e1ebee348d08f4a61 (diff)
Replace use of response.should send_email with checking ActionMailer::Base.deliveries
Diffstat (limited to 'spec/controllers/user_controller_spec.rb')
-rw-r--r--spec/controllers/user_controller_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb
index 81360d78c..519e17441 100644
--- a/spec/controllers/user_controller_spec.rb
+++ b/spec/controllers/user_controller_spec.rb
@@ -111,7 +111,7 @@ describe UserController, "when signing in" do
session[:user_id].should == users(:bob_smith_user).id
# response doesn't contain /en/ but redirect_to does...
response.should redirect_to(:controller => 'request', :action => 'list', :post_redirect => 1)
- response.should_not send_email
+ ActionMailer::Base.deliveries.should be_empty
RoutingFilter.active = true
end
@@ -150,7 +150,7 @@ describe UserController, "when signing in" do
:token => post_redirect.token
}
response.should render_template('confirm')
- response.should send_email
+ ActionMailer::Base.deliveries.should_not be_empty
end
it "should confirm your email, log you in and redirect you to where you were after you click an email link" do
@@ -162,7 +162,7 @@ describe UserController, "when signing in" do
post :signin, { :user_signin => { :email => 'unconfirmed@localhost', :password => 'jonespassword' },
:token => post_redirect.token
}
- response.should send_email
+ ActionMailer::Base.deliveries.should_not be_empty
deliveries = ActionMailer::Base.deliveries
deliveries.size.should == 1
@@ -194,7 +194,7 @@ describe UserController, "when signing in" do
post :signin, { :user_signin => { :email => 'unconfirmed@localhost', :password => 'jonespassword' },
:token => post_redirect.token
}
- response.should send_email
+ ActionMailer::Base.deliveries.should_not be_empty
deliveries = ActionMailer::Base.deliveries
deliveries.size.should == 1