chore(rubocop): fix Rails/DurationArithmetic
This commit is contained in:
parent
160178b8f8
commit
7aba5ccc3e
3 changed files with 5 additions and 5 deletions
|
@ -108,7 +108,7 @@ module ProcedureStatsConcern
|
|||
end
|
||||
|
||||
def last_considered_processed_at
|
||||
(Time.zone.now - 1.month).end_of_month
|
||||
(1.month.ago).end_of_month
|
||||
end
|
||||
|
||||
def convert_seconds_in_days(seconds)
|
||||
|
|
|
@ -318,7 +318,7 @@ FactoryBot.define do
|
|||
published
|
||||
|
||||
aasm_state { :close }
|
||||
published_at { Time.zone.now - 1.second }
|
||||
published_at { 1.second.ago }
|
||||
closed_at { Time.zone.now }
|
||||
end
|
||||
|
||||
|
@ -326,7 +326,7 @@ FactoryBot.define do
|
|||
published
|
||||
|
||||
aasm_state { :depubliee }
|
||||
published_at { Time.zone.now - 1.second }
|
||||
published_at { 1.second.ago }
|
||||
unpublished_at { Time.zone.now }
|
||||
end
|
||||
|
||||
|
|
|
@ -462,12 +462,12 @@ describe Procedure do
|
|||
end
|
||||
|
||||
context "with token expired" do
|
||||
let(:expiration_time) { (Time.zone.now - 1.day).to_i }
|
||||
let(:expiration_time) { (1.day.ago).to_i }
|
||||
it { is_expected.to be_truthy }
|
||||
end
|
||||
|
||||
context "with token not expired" do
|
||||
let(:expiration_time) { (Time.zone.now + 1.day).to_i }
|
||||
let(:expiration_time) { (1.day.from_now).to_i }
|
||||
it { is_expected.to be_falsey }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue