mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
added test for jobs, validators and helper
This commit is contained in:
parent
d53d4f2412
commit
14b8dd6ade
6 changed files with 170 additions and 4 deletions
20
test/jobs/domain_delete_job_test.rb
Normal file
20
test/jobs/domain_delete_job_test.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
require "test_helper"
|
||||
|
||||
class DomainDeleteJobTest < ActiveSupport::TestCase
|
||||
setup do
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
@domain = domains(:shop)
|
||||
@domain.update!(delete_date:'2010-07-05')
|
||||
@domain.reload
|
||||
end
|
||||
|
||||
def test_delete_domain
|
||||
dom = Domain.find_by(id: @domain.id)
|
||||
assert dom
|
||||
|
||||
DomainDeleteJob.run(@domain.id)
|
||||
|
||||
dom = Domain.find_by(id: @domain.id)
|
||||
assert_nil dom
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue