Remove body_as_json
in favor of built-in response.parsed_body
for JSON response specs (#31749)
This commit is contained in:
parent
be77a1098b
commit
6b6a80b407
107 changed files with 422 additions and 413 deletions
|
@ -35,7 +35,7 @@ RSpec.describe 'Apps' do
|
|||
expect(app.scopes.to_s).to eq scopes
|
||||
expect(app.redirect_uris).to eq redirect_uris
|
||||
|
||||
expect(body_as_json).to match(
|
||||
expect(response.parsed_body).to match(
|
||||
a_hash_including(
|
||||
id: app.id.to_s,
|
||||
client_id: app.uid,
|
||||
|
@ -61,7 +61,7 @@ RSpec.describe 'Apps' do
|
|||
expect(response).to have_http_status(200)
|
||||
expect(Doorkeeper::Application.find_by(name: client_name)).to be_present
|
||||
|
||||
expect(body_as_json)
|
||||
expect(response.parsed_body)
|
||||
.to include(
|
||||
scopes: Doorkeeper.config.default_scopes.to_a
|
||||
)
|
||||
|
@ -82,7 +82,7 @@ RSpec.describe 'Apps' do
|
|||
expect(app).to be_present
|
||||
expect(app.scopes.to_s).to eq 'read'
|
||||
|
||||
expect(body_as_json)
|
||||
expect(response.parsed_body)
|
||||
.to include(
|
||||
scopes: %w(read)
|
||||
)
|
||||
|
@ -165,7 +165,7 @@ RSpec.describe 'Apps' do
|
|||
expect(app.redirect_uri).to eq redirect_uris
|
||||
expect(app.redirect_uris).to eq redirect_uris.split
|
||||
|
||||
expect(body_as_json)
|
||||
expect(response.parsed_body)
|
||||
.to include(
|
||||
redirect_uri: redirect_uris,
|
||||
redirect_uris: redirect_uris.split
|
||||
|
@ -187,7 +187,7 @@ RSpec.describe 'Apps' do
|
|||
expect(app.redirect_uri).to eq redirect_uris.join "\n"
|
||||
expect(app.redirect_uris).to eq redirect_uris
|
||||
|
||||
expect(body_as_json)
|
||||
expect(response.parsed_body)
|
||||
.to include(
|
||||
redirect_uri: redirect_uris.join("\n"),
|
||||
redirect_uris: redirect_uris
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue