refactoring

This commit is contained in:
oleghasjanov 2025-05-14 13:56:09 +03:00
parent 5f8660adec
commit 7fbbdcb5a3
3 changed files with 0 additions and 26 deletions

View file

@ -13,21 +13,9 @@ class ReppV1CertificatesCreateTest < ActionDispatch::IntegrationTest
end
def test_creates_new_api_user_certificate_and_informs_admins
# Отладка - декодируем CSR и проверяем CN
csr_base64 = request_body[:certificate][:csr][:body]
csr_decoded = Base64.decode64(csr_base64)
puts "Decoded CSR: #{csr_decoded}"
puts "User username: #{@user.username}"
assert_difference('Certificate.count') do
assert_difference 'ActionMailer::Base.deliveries.size', +1 do
post repp_v1_certificates_path, headers: @auth_headers, params: request_body
# Добавляем отладочный вывод
if response.status != 200
puts "Response status: #{response.status}"
puts "Response body: #{response.body}"
end
end
end
json = JSON.parse(response.body, symbolize_names: true)
@ -49,11 +37,6 @@ class ReppV1CertificatesCreateTest < ActionDispatch::IntegrationTest
}
post repp_v1_certificates_path, headers: @auth_headers, params: request_body
# Отладочный вывод
puts "Response status: #{response.status}"
puts "Response body: #{response.body}"
json = JSON.parse(response.body, symbolize_names: true)
assert_response :bad_request