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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-19 09:08:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-19 09:08:03 +0300
commit4e81d9c050bfea4c866329155c17b929d7381340 (patch)
tree70fd5d3445f0b285650e068a6e99e970ceee5e00 /spec/services/auth
parentfdfde5a37a82274d7babf2519fc802c03e728622 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/auth')
-rw-r--r--spec/services/auth/container_registry_authentication_service_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/auth/container_registry_authentication_service_spec.rb b/spec/services/auth/container_registry_authentication_service_spec.rb
index 75ffdd80268..70eb35f0826 100644
--- a/spec/services/auth/container_registry_authentication_service_spec.rb
+++ b/spec/services/auth/container_registry_authentication_service_spec.rb
@@ -35,11 +35,11 @@ describe Auth::ContainerRegistryAuthenticationService do
it { expect(payload).to include('access') }
context 'a expirable' do
- let(:expires_at) { Time.at(payload['exp']) }
+ let(:expires_at) { Time.zone.at(payload['exp']) }
let(:expire_delay) { 10 }
context 'for default configuration' do
- it { expect(expires_at).not_to be_within(2.seconds).of(Time.now + expire_delay.minutes) }
+ it { expect(expires_at).not_to be_within(2.seconds).of(Time.current + expire_delay.minutes) }
end
context 'for changed configuration' do
@@ -47,7 +47,7 @@ describe Auth::ContainerRegistryAuthenticationService do
stub_application_setting(container_registry_token_expire_delay: expire_delay)
end
- it { expect(expires_at).to be_within(2.seconds).of(Time.now + expire_delay.minutes) }
+ it { expect(expires_at).to be_within(2.seconds).of(Time.current + expire_delay.minutes) }
end
end
end