diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-04-28 17:09:15 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-05-16 14:56:32 -0300 |
commit | c5526a2d9a946d99d7b4a72fc488fe6e0a9ad60b (patch) | |
tree | 3c0487cb249010cff4d95d1041c46ab81b8c87f3 /spec/controllers/registrations_controller_spec.rb | |
parent | 71ca2de7aabf3191c4f486ca15a78a5b7f6abd94 (diff) | |
download | gitlab-ce-c5526a2d9a946d99d7b4a72fc488fe6e0a9ad60b.tar.gz |
Change skip_user_confirmation_email to send_user_confirmation_email
Diffstat (limited to 'spec/controllers/registrations_controller_spec.rb')
-rw-r--r-- | spec/controllers/registrations_controller_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index b4ab767f73e..29f1847d9a1 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -8,10 +8,10 @@ describe RegistrationsController do end end - let(:user_params) { { "user"=> {"name"=>"new_user", "username"=>"new_username", "email"=>"new@user.com", "password"=>"Any_password"} } } + let(:user_params) { { user: { name: "new_user", username: "new_username", email: "new@user.com", password: "Any_password" } } } - context 'when skipping email confirmation' do - before { allow(current_application_settings).to receive(:skip_user_confirmation_email).and_return(true) } + context 'when sending email confirmation' do + before { allow(current_application_settings).to receive(:send_user_confirmation_email).and_return(false) } it 'logs user in directly' do post(:create, user_params) @@ -20,12 +20,12 @@ describe RegistrationsController do end end - context 'when not skipping email confirmation' do - before { allow(current_application_settings).to receive(:skip_user_confirmation_email).and_return(false) } + context 'when not sending email confirmation' do + before { allow(current_application_settings).to receive(:send_user_confirmation_email).and_return(true) } it 'does not authenticate user and sends confirmation email' do post(:create, user_params) - expect(ActionMailer::Base.deliveries.last.to.first).to eq(user_params["user"]["email"]) + expect(ActionMailer::Base.deliveries.last.to.first).to eq(user_params[:user][:email]) expect(subject.current_user).to be_nil end end |