diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-06-15 15:56:02 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-06-15 15:56:02 +0200 |
commit | a95f8b9a82e79781dc99ff36d6ab5f9ba293ae52 (patch) | |
tree | 18eacfe4ac2cb19684042af5f9ae850f7e502e87 /spec/controllers | |
parent | a6042a2dbb673c07251924ac59d49f000c59b0ad (diff) | |
parent | 0fdfd2dd6e01648f4daf6853f11a3ffc9a678a55 (diff) | |
download | gitlab-ce-a95f8b9a82e79781dc99ff36d6ab5f9ba293ae52.tar.gz |
Merge branch 'stanhu/gitlab-ce-fix-error-500-false-binary-negative'
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/blob_controller_spec.rb | 5 | ||||
-rw-r--r-- | spec/controllers/projects/commit_controller_spec.rb | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/spec/controllers/blob_controller_spec.rb b/spec/controllers/blob_controller_spec.rb index eb91e577b87..465013231f9 100644 --- a/spec/controllers/blob_controller_spec.rb +++ b/spec/controllers/blob_controller_spec.rb @@ -38,6 +38,11 @@ describe Projects::BlobController do let(:id) { 'invalid-branch/README.md' } it { is_expected.to respond_with(:not_found) } end + + context "binary file" do + let(:id) { 'binary-encoding/encoding/binary-1.bin' } + it { is_expected.to respond_with(:success) } + end end describe 'GET show with tree path' do diff --git a/spec/controllers/projects/commit_controller_spec.rb b/spec/controllers/projects/commit_controller_spec.rb index 438e776ec4b..6e3db10e451 100644 --- a/spec/controllers/projects/commit_controller_spec.rb +++ b/spec/controllers/projects/commit_controller_spec.rb @@ -2,6 +2,8 @@ require 'rails_helper' describe Projects::CommitController do describe 'GET show' do + render_views + let(:project) { create(:project) } before do @@ -27,6 +29,16 @@ describe Projects::CommitController do end end + it 'handles binary files' do + get(:show, + namespace_id: project.namespace.to_param, + project_id: project.to_param, + id: TestEnv::BRANCH_SHA['binary-encoding'], + format: "html") + + expect(response).to be_success + end + def go(id:) get :show, namespace_id: project.namespace.to_param, |