diff --git a/CHANGELOG.md b/CHANGELOG.md index af19f4ad6..2ef45bf81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +19.10.2020 +* Improved logging for LHV-connect messages [#1712](https://github.com/internetee/registry/issues/1712) +* LHV-connect gem update to handle blank descriptions [#1714](https://github.com/internetee/registry/issues/1714) + 16.10.2020 * Improved error handling for registrant API comapnies endpoint [#1713](https://github.com/internetee/registry/pull/1713) diff --git a/Gemfile.lock b/Gemfile.lock index c92eaa3d8..fd6ad0573 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,7 +45,7 @@ GIT GIT remote: https://github.com/internetee/lhv.git - revision: 1825240b3bf8b262418cc6c8ef7ed1aba386dd7d + revision: 1fb07818369425510a0172ad53bc86e85b6f83cc branch: master specs: lhv (0.1.0) diff --git a/lib/tasks/invoices/process_payments.rake b/lib/tasks/invoices/process_payments.rake index 3e02a8838..edf6609b9 100644 --- a/lib/tasks/invoices/process_payments.rake +++ b/lib/tasks/invoices/process_payments.rake @@ -23,6 +23,9 @@ namespace :invoices do end if incoming_transactions.any? + log 'Got incoming transactions' + log incoming_transactions + bank_statement = BankStatement.new(bank_code: Setting.registry_bank_code, iban: Setting.registry_iban) @@ -41,8 +44,15 @@ namespace :invoices do transaction.autobind_invoice end end + else + log 'Got no incoming transactions parsed, aborting' end puts "Transactions processed: #{incoming_transactions.size}" end + + def log(msg) + @log ||= Logger.new(STDOUT) + @log.info(msg) + end end diff --git a/test/integration/api/registrant/registrant_api_companies_test.rb b/test/integration/api/registrant/registrant_api_companies_test.rb index 97e2fd3c2..4f23aeac1 100644 --- a/test/integration/api/registrant/registrant_api_companies_test.rb +++ b/test/integration/api/registrant/registrant_api_companies_test.rb @@ -34,18 +34,6 @@ class RegistrantApiCompaniesTest < ApplicationIntegrationTest assert_equal(:companies, response_json.keys.first) end - def test_status_if_nil_result - contacts(:john).update!(ident: '12344321', ident_type: 'priv', ident_country_code: 'US') - - CompanyRegister.const_set(:Client, CompanyRegisterClientZeroStub) - - get '/api/v1/registrant/companies', headers: @auth_headers - response_json = JSON.parse(response.body, symbolize_names: true) - assert_equal(1, response_json.count) - assert_equal(200, response.status) - assert_equal(:companies, response_json.keys.first) - end - private def auth_token @@ -54,12 +42,3 @@ class RegistrantApiCompaniesTest < ApplicationIntegrationTest "Bearer #{hash[:access_token]}" end end - -class CompanyRegisterClientZeroStub - Company = Struct.new(:registration_number, :company_name) - - def representation_rights(citizen_personal_code:, citizen_country_code:) - [] - end -end -