summaryrefslogtreecommitdiff
path: root/spec/controllers/groups
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/groups')
-rw-r--r--spec/controllers/groups/notification_settings_controller_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/controllers/groups/notification_settings_controller_spec.rb b/spec/controllers/groups/notification_settings_controller_spec.rb
new file mode 100644
index 00000000000..3572535d61c
--- /dev/null
+++ b/spec/controllers/groups/notification_settings_controller_spec.rb
@@ -0,0 +1,17 @@
+require 'spec_helper'
+
+describe Groups::NotificationSettingsController do
+ let(:group) { create(:group) }
+
+ describe '#update' do
+ context 'when not authorized' do
+ it 'redirects to sign in page' do
+ put :update,
+ group_id: group.to_param,
+ notification_setting: { level: NotificationSetting.levels[:participating] }
+
+ expect(response).to redirect_to(new_user_session_path)
+ end
+ end
+ end
+end