From 7d57b110934f50225142789a93a0d4f54cf446f7 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Fri, 27 May 2016 19:05:52 -0700 Subject: Update tests for the current_application_settings request store changes --- spec/controllers/registrations_controller_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/controllers') 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) -- cgit v1.2.1