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/find_file_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/find_file_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/find_file_controller_spec.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/controllers/projects/find_file_controller_spec.rb b/spec/controllers/projects/find_file_controller_spec.rb index 538dbb5ad0b..a493985f8a0 100644 --- a/spec/controllers/projects/find_file_controller_spec.rb +++ b/spec/controllers/projects/find_file_controller_spec.rb @@ -53,10 +53,9 @@ describe Projects::FindFileController do it 'returns an array of file path list' do go - json = JSON.parse(response.body) is_expected.to respond_with(:success) - expect(json).not_to eq(nil) - expect(json.length).to be >= 0 + expect(json_response).not_to eq(nil) + expect(json_response.length).to be >= 0 end end |