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/requests/api/search_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/requests/api/search_spec.rb')
-rw-r--r-- | spec/requests/api/search_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/api/search_spec.rb b/spec/requests/api/search_spec.rb index 3e0b478abb3..8abdcaa2e0e 100644 --- a/spec/requests/api/search_spec.rb +++ b/spec/requests/api/search_spec.rb @@ -89,7 +89,7 @@ describe API::Search do it 'returns empty array' do get api('/search', user), params: { scope: 'milestones', search: 'awesome' } - milestones = JSON.parse(response.body) + milestones = json_response expect(milestones).to be_empty end @@ -356,7 +356,7 @@ describe API::Search do it 'returns empty array' do get api("/projects/#{project.id}/search", user), params: { scope: 'milestones', search: 'awesome' } - milestones = JSON.parse(response.body) + milestones = json_response expect(milestones).to be_empty end |