Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Leitzen <pleitzen@gitlab.com>2019-07-16 11:03:49 +0300
committerGrzegorz Bizon <grzegorz@gitlab.com>2019-07-16 11:03:49 +0300
commit7b87ed14991737930eb8f353feec9e6c8af6c1ac (patch)
treea5c22c297184ed7b00156d3a9a7f3edf19c19a41 /spec/support/shared_examples/controllers
parente38a3bba1b32754a11e805093f306135beee55dd (diff)
Cleanup usages of `JSON.parse` in specs
Prefer `json_response` where applicable.
Diffstat (limited to 'spec/support/shared_examples/controllers')
-rw-r--r--spec/support/shared_examples/controllers/issuable_notes_filter_shared_examples.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/shared_examples/controllers/issuable_notes_filter_shared_examples.rb b/spec/support/shared_examples/controllers/issuable_notes_filter_shared_examples.rb
index 0acc9e2a836..f4b02dc5350 100644
--- a/spec/support/shared_examples/controllers/issuable_notes_filter_shared_examples.rb
+++ b/spec/support/shared_examples/controllers/issuable_notes_filter_shared_examples.rb
@@ -46,7 +46,7 @@ shared_examples 'issuable notes filter' do
user.set_notes_filter(UserPreference::NOTES_FILTERS[:only_comments], issuable)
get :discussions, params: params
- discussions = JSON.parse(response.body)
+ discussions = json_response
expect(discussions.count).to eq(1)
expect(discussions.first["notes"].first["system"]).to be(false)
@@ -56,7 +56,7 @@ shared_examples 'issuable notes filter' do
user.set_notes_filter(UserPreference::NOTES_FILTERS[:only_activity], issuable)
get :discussions, params: params
- discussions = JSON.parse(response.body)
+ discussions = json_response
expect(discussions.count).to eq(1)
expect(discussions.first["notes"].first["system"]).to be(true)