diff options
author | Stan Hu <stanhu@gmail.com> | 2017-03-15 11:50:20 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-03-15 11:51:08 -0700 |
commit | 203bb0bc546cfa99272a858426904030d9292615 (patch) | |
tree | 18f68a88f9225b054e96992040bb69ddf09b0400 /spec/controllers/profiles | |
parent | ba9ea195f87a99ffa2662c8f273599f16dca4478 (diff) | |
download | gitlab-ce-203bb0bc546cfa99272a858426904030d9292615.tar.gz |
Revert "Merge branch 'option-to-be-notified-of-own-activity' into 'master'
This reverts commit 5e9666880376b3f53edb95cba77b5642d3cc1810, reversing
changes made to b35378a938e22f745b6c6ea32b53cb50f9b6c627.
Diffstat (limited to 'spec/controllers/profiles')
-rw-r--r-- | spec/controllers/profiles/notifications_controller_spec.rb | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/spec/controllers/profiles/notifications_controller_spec.rb b/spec/controllers/profiles/notifications_controller_spec.rb deleted file mode 100644 index 58caf7999cf..00000000000 --- a/spec/controllers/profiles/notifications_controller_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'spec_helper' - -describe Profiles::NotificationsController do - let(:user) do - create(:user) do |user| - user.emails.create(email: 'original@example.com') - user.emails.create(email: 'new@example.com') - user.update(notification_email: 'original@example.com') - user.save! - end - end - - describe 'GET show' do - it 'renders' do - sign_in(user) - - get :show - - expect(response).to render_template :show - end - end - - describe 'POST update' do - it 'updates only permitted attributes' do - sign_in(user) - - put :update, user: { notification_email: 'new@example.com', notified_of_own_activity: true, admin: true } - - user.reload - expect(user.notification_email).to eq('new@example.com') - expect(user.notified_of_own_activity).to eq(true) - expect(user.admin).to eq(false) - expect(controller).to set_flash[:notice].to('Notification settings saved') - end - - it 'shows an error message if the params are invalid' do - sign_in(user) - - put :update, user: { notification_email: '' } - - expect(user.reload.notification_email).to eq('original@example.com') - expect(controller).to set_flash[:alert].to('Failed to save new settings') - end - end -end |