summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-06-01 12:55:00 +0200
committerDouwe Maan <douwe@selenight.nl>2016-06-01 12:55:00 +0200
commit4a50e1f0514f318d10a273d1c252d855cfb106fb (patch)
treeb5ae0597bea9768e5540b49dcbb184bed462e43d /spec/controllers
parentc0f19cc94ecb606e521afc4a39582c4dae9c5967 (diff)
parentc8eb1dccabe5cd961895127dbbbf46d3eee4aebd (diff)
downloadgitlab-ce-4a50e1f0514f318d10a273d1c252d855cfb106fb.tar.gz
Merge branch 'current-settings-use-request-store-during-request'
Diffstat (limited to 'spec/controllers')
-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)