Commit ba9ef7f3 authored by Stan Hu's avatar Stan Hu

Merge branch '19496-fix-build' into 'master'

Assert against `ActionMailer::Base.deliveries` relatively

- Closes #19496 
- Fixes `master` build


See merge request !5082
parents 0d68e199 f617bd76
...@@ -14,8 +14,7 @@ describe RegistrationsController do ...@@ -14,8 +14,7 @@ describe RegistrationsController do
before { allow_any_instance_of(ApplicationSetting).to receive(:send_user_confirmation_email).and_return(false) } before { allow_any_instance_of(ApplicationSetting).to receive(:send_user_confirmation_email).and_return(false) }
it 'logs user in directly' do it 'logs user in directly' do
post(:create, user_params) expect { post(:create, user_params) }.not_to change{ ActionMailer::Base.deliveries.size }
expect(ActionMailer::Base.deliveries.last).to be_nil
expect(subject.current_user).not_to be_nil expect(subject.current_user).not_to be_nil
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment