mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
DEV: Use response.parsed_body
in specs (#9615)
Most of it was autofixed with rubocop-discourse 2.1.1.
This commit is contained in:
@ -6,7 +6,7 @@ RSpec.describe RobotsTxtController do
|
||||
describe '#builder' do
|
||||
it "returns json information for building a robots.txt" do
|
||||
get "/robots-builder.json"
|
||||
json = ::JSON.parse(response.body)
|
||||
json = response.parsed_body
|
||||
expect(json).to be_present
|
||||
expect(json['header']).to be_present
|
||||
expect(json['agents']).to be_present
|
||||
@ -17,7 +17,7 @@ RSpec.describe RobotsTxtController do
|
||||
|
||||
get "/robots-builder.json"
|
||||
expect(response.status).to eq(200)
|
||||
json = ::JSON.parse(response.body)
|
||||
json = response.parsed_body
|
||||
expect(json['header']).to be_present
|
||||
expect(json['agents']).to be_present
|
||||
expect(json['overridden']).to eq("something")
|
||||
|
Reference in New Issue
Block a user