diff options
author | George Andrinopoulos <geoandri@gmail.com> | 2017-04-13 22:13:55 +0300 |
---|---|---|
committer | George Andrinopoulos <geoandri@gmail.com> | 2017-04-13 22:24:44 +0300 |
commit | bdb03cd4449a3dfd5750df06847a6173662490c3 (patch) | |
tree | 4ad9e92ecba77e177772cf3676e0faf9d678ce56 /spec/services/users | |
parent | defbff482d537975e8493c4f687e195bfd3d3919 (diff) |
Refactor build_service_spec
Diffstat (limited to 'spec/services/users')
-rw-r--r-- | spec/services/users/build_service_spec.rb | 6 |
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 |