DEV: Use response.parsed_body in specs (#9615)

Most of it was autofixed with rubocop-discourse 2.1.1.
This commit is contained in:
Jarek Radosz
2020-05-07 17:04:12 +02:00
committed by GitHub
parent 69ef0da4c2
commit 781e3f5e10
70 changed files with 705 additions and 714 deletions

View File

@ -24,7 +24,7 @@ describe Admin::PermalinksController do
get "/admin/permalinks.json", params: { filter: "topic" }
expect(response.status).to eq(200)
result = JSON.parse(response.body)
result = response.parsed_body
expect(result.length).to eq(2)
end
@ -37,7 +37,7 @@ describe Admin::PermalinksController do
get "/admin/permalinks.json", params: { filter: "discourse" }
expect(response.status).to eq(200)
result = JSON.parse(response.body)
result = response.parsed_body
expect(result.length).to eq(2)
end
@ -50,7 +50,7 @@ describe Admin::PermalinksController do
get "/admin/permalinks.json", params: { filter: "discourse" }
expect(response.status).to eq(200)
result = JSON.parse(response.body)
result = response.parsed_body
expect(result.length).to eq(3)
end
end