Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElias Werberich <elias@endercoding.com>2016-03-24 13:12:45 +0300
committerElias Werberich <elias@endercoding.com>2016-03-24 21:59:54 +0300
commitc3a98d8fcc2f9f7a0ce8816c8cf9dbebe58e64e9 (patch)
tree51cff43a3df9b76919f17821b5afc4c57c311e71 /spec/controllers/root_controller_spec.rb
parent5a460c3796b8083748747e004ee678045df0aca4 (diff)
Implementing 'Groups View' and 'TODOs View' as options for dashboard preferences.
Fixes #14585.
Diffstat (limited to 'spec/controllers/root_controller_spec.rb')
-rw-r--r--spec/controllers/root_controller_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/controllers/root_controller_spec.rb b/spec/controllers/root_controller_spec.rb
index 5a104ae7c99..b14d275f7fa 100644
--- a/spec/controllers/root_controller_spec.rb
+++ b/spec/controllers/root_controller_spec.rb
@@ -43,6 +43,28 @@ describe RootController do
end
end
+ context 'who has customized their dashboard setting for groups' do
+ before do
+ user.update_attribute(:dashboard, 'groups')
+ end
+
+ it 'redirects to their group list' do
+ get :index
+ expect(response).to redirect_to dashboard_groups_path
+ end
+ end
+
+ context 'who has customized their dashboard setting for todos' do
+ before do
+ user.update_attribute(:dashboard, 'todos')
+ end
+
+ it 'redirects to their todo list' do
+ get :index
+ expect(response).to redirect_to dashboard_todos_path
+ end
+ end
+
context 'who uses the default dashboard setting' do
it 'renders the default dashboard' do
get :index