chore: use the API timestamp format in spec fixtures - #215
Merged
Conversation
The API returns timestamps in Postgres text format (2023-10-06 23:47:56.678+00), not ISO 8601. Spec fixtures and their assertions showed ISO 8601 for response fields. Convert response fixtures and assertions to the real format. Keep ISO 8601 where the API uses it: the scheduled_at request param, webhook event payloads used in signature tests, and revoked_at in the revoke response. No runtime changes.
klotty
approved these changes
Aug 6, 2026
klotty
left a comment
There was a problem hiding this comment.
No issues found across 24 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: All changes are in spec fixtures, converting 120 timestamps from ISO 8601 to the API's Postgres text format. No runtime logic, schema, or public contract changes. The diff confirms a focused test alignment with no meaningful tradeoffs for human review.
Re-trigger cubic
drish
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The API returns timestamps in Postgres text format:
YYYY-MM-DD HH:MM:SS[.ffffff]+00(for example2023-10-06 23:47:56.678+00). Spec fixtures and their assertions showed ISO 8601 for response fields. This PR makes them match the real API output.spec/emails/receiving_spec.rb:113already used the correct format; the rest of the repo now matches it.What stays ISO 8601 on purpose
scheduled_atas a request param (spec/emails_spec.rb,examples/schedule_email.rb). The API accepts ISO there.revoked_atin the revoke OAuth grant response. That endpoint returns ISO.Why
The SDK never parses these values, so there are no runtime changes. But wrong fixtures propagate: new endpoints copy the pattern, and users who read the specs get the wrong contract.
Verification
bundle exec rake spec: 336 examples, 0 failures.bundle exec rubocop: no offenses.Summary by cubic
Updated spec fixtures and assertions to use the API’s Postgres timestamp format so tests match real responses. No runtime changes.
YYYY-MM-DD HH:MM:SS[.ffffff]+00).scheduled_atrequest param, webhook event payload strings in signature specs, andrevoked_atin the revoke OAuth grant response.Written for commit 037b2c4. Summary will update on new commits.