Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-13 15:10:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-13 15:10:03 +0300
commit75ee59f7a108cf0c57e1e66e3ef5e439bae24fcd (patch)
treeb2f1ec89e16c6b27041f608c9fb12b7586e5ce94 /spec/controllers
parente79918ce90dc31527be1ef0140a99cfe450d931e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/static_site_editor_controller_spec.rb15
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