summaryrefslogtreecommitdiff
path: root/spec/controllers/registrations_controller_spec.rb
diff options
context:
space:
mode:
authorDJ Mountney <david@twkie.net>2016-05-27 19:05:52 -0700
committerDJ Mountney <david@twkie.net>2016-05-27 19:05:52 -0700
commit7d57b110934f50225142789a93a0d4f54cf446f7 (patch)
tree5bda1089b6817a96d400c95b3d0c207a6325076f /spec/controllers/registrations_controller_spec.rb
parent14b0fb516ce857b80ef447109c9dfc9692869148 (diff)
downloadgitlab-ce-7d57b110934f50225142789a93a0d4f54cf446f7.tar.gz
Update tests for the current_application_settings request store changes
Diffstat (limited to 'spec/controllers/registrations_controller_spec.rb')
-rw-r--r--spec/controllers/registrations_controller_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb
index fbe50d10ec5..209fa37d97d 100644
--- a/spec/controllers/registrations_controller_spec.rb
+++ b/spec/controllers/registrations_controller_spec.rb
@@ -11,7 +11,7 @@ describe RegistrationsController do
let(:user_params) { { user: { name: "new_user", username: "new_username", email: "new@user.com", password: "Any_password" } } }
context 'when sending email confirmation' do
- before { allow(current_application_settings).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
post(:create, user_params)
@@ -21,7 +21,7 @@ describe RegistrationsController do
end
context 'when not sending email confirmation' do
- before { allow(current_application_settings).to receive(:send_user_confirmation_email).and_return(true) }
+ before { allow_any_instance_of(ApplicationSetting).to receive(:send_user_confirmation_email).and_return(true) }
it 'does not authenticate user and sends confirmation email' do
post(:create, user_params)