summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-06-14 19:37:16 +0200
committerTim Zallmann <tzallmann@gitlab.com>2018-06-14 19:37:16 +0200
commit3b2a909ac22b7ac559062973dbd1c951fae3ed43 (patch)
treef48da067230b94279cb1231c17a6198defd1603c /spec
parent20ca5e3041949c09820fc9e467f7e1b9dd980d6c (diff)
downloadgitlab-ce-3b2a909ac22b7ac559062973dbd1c951fae3ed43.tar.gz
Makes the html attribute in the json output optional with the option html_render=false
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/projects/blob_controller_spec.rb18
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