summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-07-05 05:19:19 +0000
committerStan Hu <stanhu@gmail.com>2016-07-05 05:19:19 +0000
commitba9ef7f3935cfaa42fcdb2317567cc383c7e9c22 (patch)
tree5eeb8618a827289804624fd2f5cdc699a1e25858
parent0d68e19909824c24ff77bf6bb6ebf2db4716784b (diff)
parentf617bd76907e45d9103d768a02fbccb451524b35 (diff)
downloadgitlab-ce-ba9ef7f3935cfaa42fcdb2317567cc383c7e9c22.tar.gz
Merge branch '19496-fix-build' into 'master'
Assert against `ActionMailer::Base.deliveries` relatively - Closes #19496 - Fixes `master` build See merge request !5082
-rw-r--r--spec/controllers/registrations_controller_spec.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb
index 209fa37d97d..026f41c926b 100644
--- a/spec/controllers/registrations_controller_spec.rb
+++ b/spec/controllers/registrations_controller_spec.rb
@@ -14,8 +14,7 @@ describe RegistrationsController do
before { allow_any_instance_of(ApplicationSetting).to receive(:send_user_confirmation_email).and_return(false) }
it 'logs user in directly' do
- post(:create, user_params)
- expect(ActionMailer::Base.deliveries.last).to be_nil
+ expect { post(:create, user_params) }.not_to change{ ActionMailer::Base.deliveries.size }
expect(subject.current_user).not_to be_nil
end
end