diff options
author | Peter Leitzen <pleitzen@gitlab.com> | 2019-07-16 08:03:49 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-07-16 08:03:49 +0000 |
commit | 7b87ed14991737930eb8f353feec9e6c8af6c1ac (patch) | |
tree | a5c22c297184ed7b00156d3a9a7f3edf19c19a41 /spec/controllers/projects/blob_controller_spec.rb | |
parent | e38a3bba1b32754a11e805093f306135beee55dd (diff) | |
download | gitlab-ce-7b87ed14991737930eb8f353feec9e6c8af6c1ac.tar.gz |
Cleanup usages of `JSON.parse` in specs
Prefer `json_response` where applicable.
Diffstat (limited to 'spec/controllers/projects/blob_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/blob_controller_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/projects/blob_controller_spec.rb b/spec/controllers/projects/blob_controller_spec.rb index 44500d3cde3..45aebd1554c 100644 --- a/spec/controllers/projects/blob_controller_spec.rb +++ b/spec/controllers/projects/blob_controller_spec.rb @@ -160,7 +160,7 @@ describe Projects::BlobController do it 'renders diff context lines Gitlab::Diff::Line array' do do_get(since: 1, to: 2, offset: 0, from_merge_request: true) - lines = JSON.parse(response.body) + lines = json_response expect(lines.size).to eq(diff_lines.size) lines.each do |line| @@ -173,7 +173,7 @@ describe Projects::BlobController do it 'handles full being true' do do_get(full: true, from_merge_request: true) - lines = JSON.parse(response.body) + lines = json_response expect(lines.size).to eq(diff_lines.size) end |