diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2018-06-14 20:37:16 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-06-14 20:37:16 +0300 |
commit | 3b2a909ac22b7ac559062973dbd1c951fae3ed43 (patch) | |
tree | f48da067230b94279cb1231c17a6198defd1603c /spec/controllers/projects/blob_controller_spec.rb | |
parent | 20ca5e3041949c09820fc9e467f7e1b9dd980d6c (diff) |
Makes the html attribute in the json output optional with the option html_render=false
Diffstat (limited to 'spec/controllers/projects/blob_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/blob_controller_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/controllers/projects/blob_controller_spec.rb b/spec/controllers/projects/blob_controller_spec.rb index 00a7df6ccc8..fff363bca7a 100644 --- a/spec/controllers/projects/blob_controller_spec.rb +++ b/spec/controllers/projects/blob_controller_spec.rb @@ -55,6 +55,24 @@ describe Projects::BlobController do expect(json_response).to have_key 'raw_path' end end + + context "html_render=false" do + let(:id) { 'master/README.md' } + + before do + get(:show, + namespace_id: project.namespace, + project_id: project, + id: id, + format: :json, + html_render: false) + end + + it do + expect(response).to be_ok + expect(json_response).note_to have_key 'html' + end + end end context 'with tree path' do |