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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-27 18:09:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-27 18:09:52 +0300
commita2f36202361dcef1f2c9242929f81a4090b9ce97 (patch)
treeba21b187bf565cde47412e89bb1ccde829672dd9 /spec/requests/whats_new_controller_spec.rb
parent154523302b10ab5aeb67bde861880a98e3f8117a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/whats_new_controller_spec.rb')
-rw-r--r--spec/requests/whats_new_controller_spec.rb14
1 files changed, 13 insertions, 1 deletions
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