Use the be_within matcher to compare time with RSpec

parent c1082126
......@@ -106,7 +106,7 @@ describe Geo::RepositoryBackfillService, services: true do
it 'does not update last_repository_successful_sync_at' do
subject.execute
expect(registry.reload.last_repository_successful_sync_at).to eq last_repository_successful_sync_at
expect(registry.reload.last_repository_successful_sync_at).to be_within(1.second).of(last_repository_successful_sync_at)
end
end
end
......
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