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:
Diffstat (limited to 'spec/controllers/root_controller_spec.rb')
-rw-r--r--spec/controllers/root_controller_spec.rb22
1 files changed, 17 insertions, 5 deletions
diff --git a/spec/controllers/root_controller_spec.rb b/spec/controllers/root_controller_spec.rb
index c6a8cee2f70..6fa1d93265d 100644
--- a/spec/controllers/root_controller_spec.rb
+++ b/spec/controllers/root_controller_spec.rb
@@ -37,16 +37,16 @@ RSpec.describe RootController do
user.dashboard = 'stars'
end
- it 'redirects to their specified dashboard' do
+ it 'redirects to their starred projects list' do
get :index
expect(response).to redirect_to starred_dashboard_projects_path
end
end
- context 'who has customized their dashboard setting for project activities' do
+ context 'who has customized their dashboard setting for their own activities' do
before do
- user.dashboard = 'project_activity'
+ user.dashboard = 'your_activity'
end
it 'redirects to the activity list' do
@@ -56,12 +56,24 @@ RSpec.describe RootController do
end
end
+ context 'who has customized their dashboard setting for project activities' do
+ before do
+ user.dashboard = 'project_activity'
+ end
+
+ it 'redirects to the projects activity list' do
+ get :index
+
+ expect(response).to redirect_to activity_dashboard_path(filter: 'projects')
+ end
+ end
+
context 'who has customized their dashboard setting for starred project activities' do
before do
user.dashboard = 'starred_project_activity'
end
- it 'redirects to the activity list' do
+ it 'redirects to their starred projects activity list' do
get :index
expect(response).to redirect_to activity_dashboard_path(filter: 'starred')
@@ -73,7 +85,7 @@ RSpec.describe RootController do
user.dashboard = 'followed_user_activity'
end
- it 'redirects to the activity list' do
+ it 'redirects to the followed users activity list' do
get :index
expect(response).to redirect_to activity_dashboard_path(filter: 'followed')