mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 21:54:48 +02:00
20 lines
512 B
Ruby
20 lines
512 B
Ruby
require 'test_helper'
|
|
|
|
class DirectoTest < ActiveSupport::TestCase
|
|
setup do
|
|
@invoice = invoices(:one)
|
|
end
|
|
|
|
def test_xml_is_include_transaction_date
|
|
@invoice.update(total: @invoice.account_activity.bank_transaction.sum)
|
|
@invoice.account_activity.bank_transaction.update(paid_at: Time.zone.now)
|
|
|
|
stub_request(:post, ENV['directo_invoice_url']).with do |request|
|
|
request.body.include? 'TransactionDate'
|
|
end
|
|
|
|
assert_nothing_raised do
|
|
Directo.send_receipts
|
|
end
|
|
end
|
|
end
|