summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/services/users/build_service_spec.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/services/users/build_service_spec.rb b/spec/services/users/build_service_spec.rb
index ba1e1e9ebf8..2a6bfc1b3a0 100644
--- a/spec/services/users/build_service_spec.rb
+++ b/spec/services/users/build_service_spec.rb
@@ -33,8 +33,7 @@ describe Users::BuildService, services: true do
context 'when "send_user_confirmation_email" application setting is true' do
before do
- current_application_settings = double(:current_application_settings, send_user_confirmation_email: true, signup_enabled?: true)
- allow(service).to receive(:current_application_settings).and_return(current_application_settings)
+ stub_application_setting(send_user_confirmation_email: true, signup_enabled?: true)
end
it 'does not confirm the user' do
@@ -44,8 +43,7 @@ describe Users::BuildService, services: true do
context 'when "send_user_confirmation_email" application setting is false' do
before do
- current_application_settings = double(:current_application_settings, send_user_confirmation_email: false, signup_enabled?: true)
- allow(service).to receive(:current_application_settings).and_return(current_application_settings)
+ stub_application_setting(send_user_confirmation_email: false, signup_enabled?: true)
end
it 'confirms the user' do