Commit 6523ff70 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'sh-fix-jira-spec' into 'master'

Fix JIRA client spec failing due to time differences

See merge request gitlab-org/gitlab!72453
parents b74f37f4 0ac9ab7c
...@@ -18,7 +18,15 @@ RSpec.describe Atlassian::JiraConnect::Client do ...@@ -18,7 +18,15 @@ RSpec.describe Atlassian::JiraConnect::Client do
end end
end end
describe '.generate_update_sequence_id' do around do |example|
if example.metadata[:skip_freeze_time]
example.run
else
freeze_time { example.run }
end
end
describe '.generate_update_sequence_id', :skip_freeze_time do
it 'returns unix time in microseconds as integer', :aggregate_failures do it 'returns unix time in microseconds as integer', :aggregate_failures do
travel_to(Time.utc(1970, 1, 1, 0, 0, 1)) do travel_to(Time.utc(1970, 1, 1, 0, 0, 1)) do
expect(described_class.generate_update_sequence_id).to eq(1000) expect(described_class.generate_update_sequence_id).to eq(1000)
......
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