Commit 06486b41 authored by Stan Hu's avatar Stan Hu

Fix hour-dependent spec in error_tracking_shared_context.rb

The test was failing because the expected format included the leading 0
in "08:01:29 AM UTC" instead of omitting it in "8:01:29 AM UTC".  As
https://ruby-doc.org/stdlib-2.6.5/libdoc/date/rdoc/DateTime.html
mentions, we can omit the leading value by using `%-l` in `strftime`.
parent 091aebc8
......@@ -12,7 +12,7 @@ shared_context 'sentry error tracking context feature' do
let(:sentry_api_urls) { Sentry::ApiUrls.new(project_error_tracking_settings.api_url) }
let(:issue_id) { issue_response['id'] }
let(:issue_seen) { 1.year.ago.utc }
let(:formatted_issue_seen) { issue_seen.strftime("%Y-%m-%d %I:%M:%S%p %Z") }
let(:formatted_issue_seen) { issue_seen.strftime("%Y-%m-%d %-l:%M:%S%p %Z") }
let(:date_received) { 1.month.ago.utc }
before do
......
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