diff options
author | Stan Hu <stanhu@gmail.com> | 2015-09-25 17:04:20 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-09-26 08:46:05 -0700 |
commit | 0383afc66ab889afc6af02203902d1d515723a96 (patch) | |
tree | 671139b4d862fa7c04ec5a1930dd3f8cf22dfefc /spec/controllers | |
parent | 6d6918105941bcb868b59350f56eb2f76efd7cf5 (diff) | |
download | gitlab-ce-0383afc66ab889afc6af02203902d1d515723a96.tar.gz |
Add user preference to view project activity and starred project activity as default dashboard
Closes #2662
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/root_controller_spec.rb | 24 |
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 |