summaryrefslogtreecommitdiff
path: root/spec/controllers/projects
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 09:09:46 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-15 09:09:46 +0000
commit221b529789f4090341a825695aeb49b8df6dd11d (patch)
treec8843e4ca5ef1034752eb68712fcf338b24950db /spec/controllers/projects
parent00a8c64ffd18e74df4b1cdeda7776b5221fddafe (diff)
downloadgitlab-ce-221b529789f4090341a825695aeb49b8df6dd11d.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r--spec/controllers/projects/static_site_editor_controller_spec.rb16
1 files changed, 15 insertions, 1 deletions
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) }