mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 14:06:21 +02:00
added test
This commit is contained in:
parent
4c8b345ecf
commit
5ddd8b4817
1 changed files with 22 additions and 0 deletions
|
@ -73,4 +73,26 @@ class DisputeStatusUpdateJobTest < ActiveJob::TestCase
|
|||
whois_record.reload
|
||||
assert_not whois_record.json['status'].include? 'disputed'
|
||||
end
|
||||
|
||||
def test_close_dispute_with_domains_with_dispute_status
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
|
||||
domain = domains(:shop)
|
||||
domain.statuses << DomainStatus::DISPUTED
|
||||
domain.save && domain.reload
|
||||
|
||||
dispute = disputes(:closed)
|
||||
dispute.domain_name = domain.name
|
||||
dispute.save && dispute.reload
|
||||
|
||||
assert domain.statuses.include? DomainStatus::DISPUTED
|
||||
|
||||
perform_enqueued_jobs do
|
||||
DisputeStatusUpdateJob.perform_now
|
||||
end
|
||||
|
||||
domain.reload
|
||||
|
||||
refute domain.statuses.include? DomainStatus::DISPUTED
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue