diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-27 18:09:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-27 18:09:52 +0300 |
commit | a2f36202361dcef1f2c9242929f81a4090b9ce97 (patch) | |
tree | ba21b187bf565cde47412e89bb1ccde829672dd9 /spec/requests/whats_new_controller_spec.rb | |
parent | 154523302b10ab5aeb67bde861880a98e3f8117a (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.rb | 14 |
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 |