diff options
Diffstat (limited to 'spec/controllers/projects/static_site_editor_controller_spec.rb')
-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 |