Skip to content

tests: Added tests for associations#7429

Closed
gdhameeja wants to merge 1 commit intogo-gorm:masterfrom
gdhameeja:gdhameeja/tests
Closed

tests: Added tests for associations#7429
gdhameeja wants to merge 1 commit intogo-gorm:masterfrom
gdhameeja:gdhameeja/tests

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.

@jinzhu jinzhu closed this May 21, 2025
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