mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
parent
ab77a1ae31
commit
e1e41a962e
2 changed files with 1 additions and 13 deletions
|
@ -32,12 +32,11 @@ class DomainCron
|
|||
end
|
||||
|
||||
def self.start_expire_period
|
||||
Rails.logger.info('Expiring domains')
|
||||
|
||||
::PaperTrail.whodunnit = "cron - #{__method__}"
|
||||
domains = Domain.expired
|
||||
marked = 0
|
||||
real = 0
|
||||
|
||||
domains.each do |domain|
|
||||
next unless domain.expirable?
|
||||
real += 1
|
||||
|
|
|
@ -38,15 +38,4 @@ RSpec.describe DomainCron do
|
|||
@domain.reload
|
||||
@domain.statuses.include?(DomainStatus::EXPIRED).should == true
|
||||
end
|
||||
|
||||
describe '::start_expire_period', db: false do
|
||||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010')
|
||||
end
|
||||
|
||||
it 'logs start time' do
|
||||
expect(Rails.logger).to receive(:info).with('Expiring domains')
|
||||
described_class.start_expire_period
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue