Use response.parsed_body for html response checks (#31750)
This commit is contained in:
@@ -48,7 +48,7 @@ RSpec.describe Admin::AccountsController do
|
||||
end
|
||||
|
||||
def accounts_table_rows
|
||||
Nokogiri::Slop(response.body).css('table.accounts-table tr')
|
||||
response.parsed_body.css('table.accounts-table tr')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ RSpec.describe Admin::ExportDomainBlocksController do
|
||||
end
|
||||
|
||||
def batch_table_rows
|
||||
Nokogiri::Slop(response.body).css('body div.batch-table__row')
|
||||
response.parsed_body.css('body div.batch-table__row')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ RSpec.describe Admin::InstancesController do
|
||||
end
|
||||
|
||||
def instance_directory_links
|
||||
Nokogiri::Slop(response.body).css('div.directory__tag a')
|
||||
response.parsed_body.css('div.directory__tag a')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ RSpec.describe Auth::RegistrationsController do
|
||||
end
|
||||
|
||||
def username_error_text
|
||||
Nokogiri::Slop(response.body).css('.user_account_username .error').text
|
||||
response.parsed_body.css('.user_account_username .error').text
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user