summaryrefslogtreecommitdiff
path: root/spec/controllers/root_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/root_controller_spec.rb')
-rw-r--r--spec/controllers/root_controller_spec.rb24
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/controllers/root_controller_spec.rb b/spec/controllers/root_controller_spec.rb
index 64dfe8f34e3..5a104ae7c99 100644
--- a/spec/controllers/root_controller_spec.rb
+++ b/spec/controllers/root_controller_spec.rb
@@ -10,7 +10,7 @@ describe RootController do
allow(subject).to receive(:current_user).and_return(user)
end
- context 'who has customized their dashboard setting' do
+ context 'who has customized their dashboard setting for starred projects' do
before do
user.update_attribute(:dashboard, 'stars')
end
@@ -21,6 +21,28 @@ describe RootController do
end
end
+ context 'who has customized their dashboard setting for project activities' do
+ before do
+ user.update_attribute(:dashboard, 'project_activity')
+ end
+
+ it 'redirects to the activity list' do
+ get :index
+ expect(response).to redirect_to activity_dashboard_path
+ end
+ end
+
+ context 'who has customized their dashboard setting for starred project activities' do
+ before do
+ user.update_attribute(:dashboard, 'starred_project_activity')
+ end
+
+ it 'redirects to the activity list' do
+ get :index
+ expect(response).to redirect_to activity_dashboard_path(filter: 'starred')
+ end
+ end
+
context 'who uses the default dashboard setting' do
it 'renders the default dashboard' do
get :index