diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-13 12:10:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-13 12:10:03 +0000 |
commit | 75ee59f7a108cf0c57e1e66e3ef5e439bae24fcd (patch) | |
tree | b2f1ec89e16c6b27041f608c9fb12b7586e5ce94 /spec/controllers | |
parent | e79918ce90dc31527be1ef0140a99cfe450d931e (diff) | |
download | gitlab-ce-75ee59f7a108cf0c57e1e66e3ef5e439bae24fcd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/static_site_editor_controller_spec.rb | 15 |
1 files changed, 14 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 7f1b67fc734..d1224bb75c0 100644 --- a/spec/controllers/projects/static_site_editor_controller_spec.rb +++ b/spec/controllers/projects/static_site_editor_controller_spec.rb @@ -10,7 +10,8 @@ describe Projects::StaticSiteEditorController do { namespace_id: project.namespace, project_id: project, - id: 'master/README.md' + id: 'master/README.md', + return_url: 'http://example.com' } end @@ -38,6 +39,18 @@ describe Projects::StaticSiteEditorController do it 'renders the edit page' do expect(response).to render_template(:show) end + + it 'assigns a config variable' do + expect(assigns(:config)).to be_a(Gitlab::StaticSiteEditor::Config) + end + + context 'when combination of ref and file path is incorrect' do + let(:default_params) { super().merge(id: 'unknown') } + + it 'responds with 404 page' do + expect(response).to have_gitlab_http_status(:not_found) + end + end end end end |