diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-04 00:09:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-04 00:09:00 +0300 |
commit | 71c9d577ad563572050335dc261ba7673e3e566f (patch) | |
tree | dcb4bb47b2d843de160feffe26dcefe20403f3fc /spec/controllers | |
parent | 63a015fd85ae35634eb882d0078e65d80300816c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/concerns/confirm_email_warning_spec.rb | 10 | ||||
-rw-r--r-- | spec/controllers/projects/repositories_controller_spec.rb | 8 |
2 files changed, 8 insertions, 10 deletions
diff --git a/spec/controllers/concerns/confirm_email_warning_spec.rb b/spec/controllers/concerns/confirm_email_warning_spec.rb index 56a6efab8ed..93e3423261c 100644 --- a/spec/controllers/concerns/confirm_email_warning_spec.rb +++ b/spec/controllers/concerns/confirm_email_warning_spec.rb @@ -5,7 +5,6 @@ require 'spec_helper' describe ConfirmEmailWarning do before do stub_feature_flags(soft_email_confirmation: true) - allow(User).to receive(:allow_unconfirmed_access_for).and_return 2.days end controller(ApplicationController) do @@ -52,15 +51,6 @@ describe ConfirmEmailWarning do context 'with an unconfirmed user' do let(:user) { create(:user, confirmed_at: nil) } - context 'when executing a peek request' do - before do - request.path = '/-/peek' - get :index - end - - it { is_expected.not_to set_confirm_warning_for(user.email) } - end - context 'when executing a json request' do before do get :index, format: :json diff --git a/spec/controllers/projects/repositories_controller_spec.rb b/spec/controllers/projects/repositories_controller_spec.rb index 42dfdd3115c..d4a81f24d9c 100644 --- a/spec/controllers/projects/repositories_controller_spec.rb +++ b/spec/controllers/projects/repositories_controller_spec.rb @@ -88,6 +88,14 @@ describe Projects::RepositoriesController do end end + context "when the request format is HTML" do + it "renders 404" do + get :archive, params: { namespace_id: project.namespace, project_id: project, id: 'master' }, format: "html" + + expect(response).to have_gitlab_http_status(:not_found) + end + end + describe 'caching' do it 'sets appropriate caching headers' do get_archive |