From a2f36202361dcef1f2c9242929f81a4090b9ce97 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 27 Apr 2021 15:09:52 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/requests/whats_new_controller_spec.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'spec/requests/whats_new_controller_spec.rb') diff --git a/spec/requests/whats_new_controller_spec.rb b/spec/requests/whats_new_controller_spec.rb index ffb31bdf9bb..d4976a2bba3 100644 --- a/spec/requests/whats_new_controller_spec.rb +++ b/spec/requests/whats_new_controller_spec.rb @@ -7,7 +7,7 @@ RSpec.describe WhatsNewController, :clean_gitlab_redis_cache do ReleaseHighlight.instance_variable_set(:@file_paths, nil) end - describe 'whats_new_path' do + describe 'GET #index' do let(:item) { double(:item) } let(:highlights) { double(:highlight, items: [item], map: [item].map, next_page: 2) } @@ -35,5 +35,17 @@ RSpec.describe WhatsNewController, :clean_gitlab_redis_cache do expect(response).to have_gitlab_http_status(:not_found) end end + + context 'with whats_new_variant = disabled' do + before do + Gitlab::CurrentSettings.current_application_settings.whats_new_variant_disabled! + end + + it 'returns a 404' do + get whats_new_path, xhr: true + + expect(response).to have_gitlab_http_status(:not_found) + end + end end end -- cgit v1.2.3