Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Schubert <mail@dennis-schubert.de>2022-09-11 00:22:34 +0300
committerDennis Schubert <mail@dennis-schubert.de>2022-09-11 00:22:34 +0300
commit6ddd16267ad44baf03d7447dc910942b3eb77f9d (patch)
treeac14c0e4835cfd658dbc38f06144a3a12dde5b4e
parent7c450b4446c4d060b15cc9c6e50739ef60550ecb (diff)
Give queue_users_for_removal_spec a bit of allowance to accord for timezone changes
-rw-r--r--spec/workers/queue_users_for_removal_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/workers/queue_users_for_removal_spec.rb b/spec/workers/queue_users_for_removal_spec.rb
index 8b9707104..2ddc4262b 100644
--- a/spec/workers/queue_users_for_removal_spec.rb
+++ b/spec/workers/queue_users_for_removal_spec.rb
@@ -22,7 +22,7 @@ describe Workers::QueueUsersForRemoval do
user = FactoryBot.create(:user, last_seen: Time.zone.now - 732.days, sign_in_count: 5)
Workers::QueueUsersForRemoval.new.perform
user.reload
- expect(user.remove_after.to_i).to eq(removal_date.utc.to_i)
+ expect(user.remove_after.to_i).to be_within(1.day).of(removal_date.utc.to_i)
expect(ActionMailer::Base.deliveries.count).to eq(1)
end
@@ -31,7 +31,7 @@ describe Workers::QueueUsersForRemoval do
user = FactoryBot.create(:user, last_seen: Time.zone.now - 735.days, sign_in_count: 0)
Workers::QueueUsersForRemoval.new.perform
user.reload
- expect(user.remove_after.to_i).to eq(removal_date.utc.to_i)
+ expect(user.remove_after.to_i).to be_within(1.day).of(removal_date.utc.to_i)
expect(ActionMailer::Base.deliveries.count).to eq(0) # no email sent
end