From 221b529789f4090341a825695aeb49b8df6dd11d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 15 Apr 2020 09:09:46 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../projects/static_site_editor_controller_spec.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'spec/controllers/projects') diff --git a/spec/controllers/projects/static_site_editor_controller_spec.rb b/spec/controllers/projects/static_site_editor_controller_spec.rb index d1224bb75c0..f7c8848b8cf 100644 --- a/spec/controllers/projects/static_site_editor_controller_spec.rb +++ b/spec/controllers/projects/static_site_editor_controller_spec.rb @@ -26,7 +26,21 @@ describe Projects::StaticSiteEditorController do end end - %w[guest developer maintainer].each do |role| + context 'as guest' do + let(:user) { create(:user) } + + before do + project.add_guest(user) + sign_in(user) + get :show, params: default_params + end + + it 'responds with 404 page' do + expect(response).to have_gitlab_http_status(:not_found) + end + end + + %w[developer maintainer].each do |role| context "as #{role}" do let(:user) { create(:user) } -- cgit v1.2.1