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:
Diffstat (limited to 'spec/controllers/projects/static_site_editor_controller_spec.rb')
-rw-r--r--spec/controllers/projects/static_site_editor_controller_spec.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/controllers/projects/static_site_editor_controller_spec.rb b/spec/controllers/projects/static_site_editor_controller_spec.rb
index 7883c7e6f81..7170a3466c5 100644
--- a/spec/controllers/projects/static_site_editor_controller_spec.rb
+++ b/spec/controllers/projects/static_site_editor_controller_spec.rb
@@ -8,6 +8,8 @@ RSpec.describe Projects::StaticSiteEditorController do
let(:data) { instance_double(Hash) }
describe 'GET show' do
+ render_views
+
let(:default_params) do
{
namespace_id: project.namespace,
@@ -82,8 +84,9 @@ RSpec.describe Projects::StaticSiteEditorController do
context 'when invalid config file' do
let(:service_response) { ServiceResponse.error(message: 'invalid') }
- it 'returns 422' do
- expect(response).to have_gitlab_http_status(:unprocessable_entity)
+ it 'redirects to project page and flashes error message' do
+ expect(response).to redirect_to(project_path(project))
+ expect(response).to set_flash[:alert].to('invalid')
end
end
end