Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix move thread test refactor #110

Merged
merged 10 commits into from
Sep 10, 2024
Merged

Conversation

unenglishable
Copy link
Member

refactor to improve test handling

changes naivedatetime's at second precision to usec

reverts changes to models and factories that add functionality for specifying created_at time.
adapting usec usage eliminates the need to sequence thread/post creation

moves data creation for thread move test into the test itself, simplifying setup() and reducing
complexity that could lead to issues when writing future tests

storing higher precision date time allows test results to be accurate

changes models to use :naive_datetime_usec and changeset functions use
NaiveDateTime.utc_now() without truncating

subject to change; especially in `lib/epochtalk_server/models/post.ex`
where code sets `now = now`
updates to timestamp precision in created_at/updated_at no longer
require custom timestamp to be inserted
move data for "move" test into the test

update comments to make them more descriptive
@unenglishable unenglishable force-pushed the fix-move-thread-test-refactor branch from 029c76d to 27c46c8 Compare September 10, 2024 20:20
@akinsey akinsey merged commit 071fcb5 into fix-move-thread Sep 10, 2024
5 checks passed
@akinsey akinsey deleted the fix-move-thread-test-refactor branch September 10, 2024 20:25
Copy link

🎉 This PR is included in version 1.35.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants