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.rb28
1 files changed, 24 insertions, 4 deletions
diff --git a/spec/controllers/root_controller_spec.rb b/spec/controllers/root_controller_spec.rb
index 01ff646274a..dbf1b3baf25 100644
--- a/spec/controllers/root_controller_spec.rb
+++ b/spec/controllers/root_controller_spec.rb
@@ -128,11 +128,31 @@ RSpec.describe RootController do
end
end
- context 'who uses the default dashboard setting' do
- it 'renders the default dashboard' do
- get :index
+ context 'who uses the default dashboard setting', :aggregate_failures do
+ render_views
+
+ context 'with customize homepage banner' do
+ it 'renders the default dashboard' do
+ get :index
+
+ expect(response).to render_template 'root/index'
+ expect(response.body).to have_css('.js-customize-homepage-banner')
+ end
+ end
+
+ context 'without customize homepage banner' do
+ before do
+ Users::DismissUserCalloutService.new(
+ container: nil, current_user: user, params: { feature_name: UserCalloutsHelper::CUSTOMIZE_HOMEPAGE }
+ ).execute
+ end
+
+ it 'renders the default dashboard' do
+ get :index
- expect(response).to render_template 'dashboard/projects/index'
+ expect(response).to render_template 'root/index'
+ expect(response.body).not_to have_css('.js-customize-homepage-banner')
+ end
end
end
end