mirror of
https://github.com/internetee/registry.git
synced 2025-08-16 14:33:55 +02:00
refactoring
This commit is contained in:
parent
5f8660adec
commit
7fbbdcb5a3
3 changed files with 0 additions and 26 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue