Skip to content

Conversation

@jonathanhefner
Copy link
Contributor

@jonathanhefner jonathanhefner commented Nov 4, 2022

This extends the fix from 1f150f6 to Rails 6.1, and adds test coverage. Specifically, it adds a record reload to the "stores the default on creation" test to ensure that the postcondition holds. Without the reload, the "stores the default on creation" test would pass even before 1f150f6.

This commit also adds a test for when the record is partially loaded, and changes some Rails private API calls to equivalent public API calls.


Extracted from #96.

@jonathanhefner jonathanhefner force-pushed the persisted-defaults-test-coverage branch from e9baa15 to 51402b6 Compare November 4, 2022 17:38
This extends the fix from 1f150f6
to Rails 6.1, and adds test coverage.  Specifically, it adds a record
reload to the "stores the default on creation" test to ensure that the
postcondition holds.  Without the reload, the "stores the default on
creation" test would pass even before
1f150f6.

This commit also adds a test for when the record is partially loaded,
and changes some Rails private API calls to equivalent public API calls.
@jonathanhefner jonathanhefner force-pushed the persisted-defaults-test-coverage branch from 51402b6 to 89dc6aa Compare November 4, 2022 17:38
@jonathanhefner jonathanhefner changed the title Add more test coverage for persisted defaults Persist default values for Rails 6.1 Nov 4, 2022
@jonathanhefner
Copy link
Contributor Author

Based on the previous test failure, I pushed a commit to extend the fix from #95 to Rails 6.1.

@byroot byroot merged commit 7d6dce4 into byroot:master Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants