summaryrefslogtreecommitdiff
path: root/spec/lib/google_api
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-10-06 18:23:53 +0900
committerShinya Maeda <shinya@gitlab.com>2017-10-06 18:23:53 +0900
commit638c616296b37b528c1b56f63a818301a502f7aa (patch)
treef58194566e84063584983a0e8f48d39f3e90bd50 /spec/lib/google_api
parent354e2ef08df3c704ca325415116587440260f67b (diff)
downloadgitlab-ce-638c616296b37b528c1b56f63a818301a502f7aa.tar.gz
Use utc for time comparision
Diffstat (limited to 'spec/lib/google_api')
-rw-r--r--spec/lib/google_api/cloud_platform/client_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/google_api/cloud_platform/client_spec.rb b/spec/lib/google_api/cloud_platform/client_spec.rb
index 6b454a593a0..6538dc21d6f 100644
--- a/spec/lib/google_api/cloud_platform/client_spec.rb
+++ b/spec/lib/google_api/cloud_platform/client_spec.rb
@@ -7,7 +7,7 @@ describe GoogleApi::CloudPlatform::Client do
describe '#validate_token' do
subject { client.validate_token(expires_at) }
- let(:expires_at) { 1.hour.since.strftime('%s') }
+ let(:expires_at) { 1.hour.since.utc.strftime('%s') }
context 'when token is nil' do
let(:token) { nil }
@@ -26,7 +26,7 @@ describe GoogleApi::CloudPlatform::Client do
end
context 'when expires in 10 minutes' do
- let(:expires_at) { 5.minutes.since.strftime('%s') }
+ let(:expires_at) { 5.minutes.since.utc.strftime('%s') }
it { is_expected.to be_falsy }
end