Skip to content

tests: Added tests for associations #7429

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gdhameeja
Copy link

Added tests for relationship, parsing, replace, delete

  • [ x ] Do only one thing
  • [ x ] Non breaking API changes
  • [ x ] Tested

What did this pull request do?

Adds tests for associations. Bumped test coverage for the file associations.go from 0 percent to 48%.

User Case Description

I added these test cases as a way to learn more about gorm and its codebase. I would love to contribute more tests going forward if they're welcome.

@gdhameeja gdhameeja force-pushed the gdhameeja/tests branch 2 times, most recently from cdafdb1 to beb745a Compare April 17, 2025 12:55
Added tests for relationship, parsing, replace, delete
@jinzhu
Copy link
Member

jinzhu commented Apr 20, 2025

You can find some existing association-related tests in the tests directory of the GORM repository — the files typically start with associations_, like:

👉 https://github.com/go-gorm/gorm/tree/master/tests

It might be a good idea to add your tests there to keep things organized and consistent with the current structure.

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