Skip to content

Add unit test verifying chainable query methods mutate statement#7684

Merged
jinzhu merged 2 commits intogo-gorm:masterfrom
miladev95:test/add-chainable-api-test
Jan 31, 2026
Merged

Add unit test verifying chainable query methods mutate statement#7684
jinzhu merged 2 commits intogo-gorm:masterfrom
miladev95:test/add-chainable-api-test

Conversation

@miladev95
Copy link
Copy Markdown
Contributor

Summary:
Add a self-contained unit test that asserts chainable methods (Model, Table, Distinct, Select, Where, Order, Limit, Offset, Joins, Preload, Scopes, Unscoped, Raw) correctly mutate DB.Statement without requiring a real database connection.

Changes:
Added chainable_api_test.go) with a minimal test Dialector and newTestDB() helper.

Notes:
Keeps tests fast and isolated,can be extended into smaller focused tests for edge cases.

@propel-code-bot propel-code-bot Bot changed the title Add unit test for chainable API Add unit test verifying chainable query methods mutate statement Dec 31, 2025
@jinzhu jinzhu merged commit 4380dd6 into go-gorm:master Jan 31, 2026
26 checks passed
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