summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ci/cron_parser_spec.rb
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-04-05 18:29:15 +0900
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-04-06 23:46:59 +0900
commit12a5380f5cb2ce8b652344f053b2333f6f5e80a9 (patch)
tree7f94ea68033150faf4c4c126cf1c92c4996df648 /spec/lib/gitlab/ci/cron_parser_spec.rb
parentc2c3ee1bf9101b68b59685fa046759729eeadda1 (diff)
downloadgitlab-ce-12a5380f5cb2ce8b652344f053b2333f6f5e80a9.tar.gz
Implement a offset calculation on cron_parser_spec
Diffstat (limited to 'spec/lib/gitlab/ci/cron_parser_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/cron_parser_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/cron_parser_spec.rb b/spec/lib/gitlab/ci/cron_parser_spec.rb
index b07b84027fc..0864bc7258d 100644
--- a/spec/lib/gitlab/ci/cron_parser_spec.rb
+++ b/spec/lib/gitlab/ci/cron_parser_spec.rb
@@ -67,7 +67,7 @@ describe Gitlab::Ci::CronParser do
it_behaves_like "returns time in the future"
it 'converts time in server time zone' do
- expect(subject.hour).to eq(7)
+ expect(subject.hour).to eq((Time.zone.now.in_time_zone(cron_timezone).utc_offset / 60 / 60).abs)
end
end
end