Commit 626fb3a9 authored by Michael Kozono's avatar Michael Kozono

Fix time travelling tests.

parent 0ef7c086
...@@ -9,7 +9,7 @@ describe Gitlab::BackgroundMigration::UpdateAuthorizedKeysFileSince do ...@@ -9,7 +9,7 @@ describe Gitlab::BackgroundMigration::UpdateAuthorizedKeysFileSince do
subject { background_migration.perform(cutoff_datetime) } subject { background_migration.perform(cutoff_datetime) }
around do |example| around do |example|
Timecop.travel(1.day.from_now) { example.run } Timecop.travel(cutoff_datetime + 1.day) { example.run }
end end
context 'when an SSH key was created after the cutoff datetime' do context 'when an SSH key was created after the cutoff datetime' do
...@@ -35,7 +35,7 @@ describe Gitlab::BackgroundMigration::UpdateAuthorizedKeysFileSince do ...@@ -35,7 +35,7 @@ describe Gitlab::BackgroundMigration::UpdateAuthorizedKeysFileSince do
subject { background_migration.add_keys_since(cutoff_datetime) } subject { background_migration.add_keys_since(cutoff_datetime) }
around do |example| around do |example|
Timecop.travel(1.day.from_now) { example.run } Timecop.travel(cutoff_datetime + 1.day) { example.run }
end end
context 'when an SSH key was created after the cutoff datetime' do context 'when an SSH key was created after the cutoff datetime' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment