summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorMicael Bergeron <mbergeron@gitlab.com>2017-09-12 14:07:31 +0000
committerRémy Coutable <remy@rymai.me>2017-09-12 14:07:31 +0000
commita31e0aff224d4047e10fae98b6f9dc9f84b7457a (patch)
tree6e2367f91fd008227a44eab0408c872336249b80 /spec/controllers
parent30db01b2edd2a5ea12aff6b60bbc4bb60ed6d2d2 (diff)
downloadgitlab-ce-a31e0aff224d4047e10fae98b6f9dc9f84b7457a.tar.gz
Resolve "Error 500 in non-UTF8 branch names"
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/branches_controller_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/controllers/projects/branches_controller_spec.rb b/spec/controllers/projects/branches_controller_spec.rb
index 745d051a5c1..5e0b57e9b2e 100644
--- a/spec/controllers/projects/branches_controller_spec.rb
+++ b/spec/controllers/projects/branches_controller_spec.rb
@@ -367,5 +367,20 @@ describe Projects::BranchesController do
expect(parsed_response.first).to eq 'master'
end
end
+
+ context 'when branch contains an invalid UTF-8 sequence' do
+ before do
+ project.repository.create_branch("wrong-\xE5-utf8-sequence")
+ end
+
+ it 'return with a status 200' do
+ get :index,
+ namespace_id: project.namespace,
+ project_id: project,
+ format: :html
+
+ expect(response).to have_http_status(200)
+ end
+ end
end
end