mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 23:16:23 +02:00
rename directo job
This commit is contained in:
parent
cd81e58ff6
commit
ce677ce69c
4 changed files with 155 additions and 155 deletions
|
@ -1,6 +1,6 @@
|
|||
require "test_helper"
|
||||
|
||||
class DirectoInvoiceForwardJobTest < ActiveSupport::TestCase
|
||||
class DirectoInvoiceForwardLegacyJobTest < ActiveSupport::TestCase
|
||||
setup do
|
||||
@invoice = invoices(:one)
|
||||
@user = registrars(:bestnames)
|
||||
|
@ -38,7 +38,7 @@ class DirectoInvoiceForwardJobTest < ActiveSupport::TestCase
|
|||
end.to_return(status: 200, body: response)
|
||||
|
||||
assert_nothing_raised do
|
||||
DirectoInvoiceForwardJob.perform_now(monthly: false, dry: false)
|
||||
DirectoInvoiceForwardLegacyJob.perform_now(monthly: false, dry: false)
|
||||
end
|
||||
|
||||
assert_not_empty @invoice.directo_records.first.request
|
||||
|
@ -52,7 +52,7 @@ class DirectoInvoiceForwardJobTest < ActiveSupport::TestCase
|
|||
Setting.directo_monthly_number_max = 30_991
|
||||
|
||||
assert_raises 'RuntimeError' do
|
||||
DirectoInvoiceForwardJob.perform_now(monthly: true, dry: false)
|
||||
DirectoInvoiceForwardLegacyJob.perform_now(monthly: true, dry: false)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -78,7 +78,7 @@ class DirectoInvoiceForwardJobTest < ActiveSupport::TestCase
|
|||
end.to_return(status: 200, body: response)
|
||||
|
||||
assert_difference 'Setting.directo_monthly_number_last' do
|
||||
DirectoInvoiceForwardJob.perform_now(monthly: true, dry: false)
|
||||
DirectoInvoiceForwardLegacyJob.perform_now(monthly: true, dry: false)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -103,7 +103,7 @@ class DirectoInvoiceForwardJobTest < ActiveSupport::TestCase
|
|||
end.to_return(status: 200, body: response)
|
||||
|
||||
assert_difference 'Setting.directo_monthly_number_last' do
|
||||
DirectoInvoiceForwardJob.perform_now(monthly: true, dry: false)
|
||||
DirectoInvoiceForwardLegacyJob.perform_now(monthly: true, dry: false)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -126,7 +126,7 @@ class DirectoInvoiceForwardJobTest < ActiveSupport::TestCase
|
|||
end.to_return(status: 200, body: response)
|
||||
|
||||
assert_difference 'Setting.directo_monthly_number_last' do
|
||||
DirectoInvoiceForwardJob.perform_now(monthly: true, dry: false)
|
||||
DirectoInvoiceForwardLegacyJob.perform_now(monthly: true, dry: false)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -148,7 +148,7 @@ class DirectoInvoiceForwardJobTest < ActiveSupport::TestCase
|
|||
end.to_return(status: 200, body: response)
|
||||
|
||||
assert_difference 'Setting.directo_monthly_number_last' do
|
||||
DirectoInvoiceForwardJob.perform_now(monthly: true, dry: false)
|
||||
DirectoInvoiceForwardLegacyJob.perform_now(monthly: true, dry: false)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -186,7 +186,7 @@ class DirectoInvoiceForwardJobTest < ActiveSupport::TestCase
|
|||
(body.include? 'StartDate') && (body.include? 'EndDate') && (body.include? 'goodnames')
|
||||
end.to_return(status: 200, body: response)
|
||||
|
||||
DirectoInvoiceForwardJob.perform_now(monthly: true, dry: false)
|
||||
DirectoInvoiceForwardLegacyJob.perform_now(monthly: true, dry: false)
|
||||
|
||||
assert_requested first_registrar_stub
|
||||
assert_requested second_registrar_stub
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue