{"id":18655491,"url":"https://github.com/go-rel/reltest","last_synced_at":"2025-06-29T03:41:34.434Z","repository":{"id":38251505,"uuid":"398538017","full_name":"go-rel/reltest","owner":"go-rel","description":"Database unit testing for Golang","archived":false,"fork":false,"pushed_at":"2025-03-13T00:26:40.000Z","size":164,"stargazers_count":1,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T08:20:48.088Z","etag":null,"topics":["golang","hacktoberfest","orm","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-rel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Fs02"}},"created_at":"2021-08-21T11:15:24.000Z","updated_at":"2024-12-02T01:34:36.000Z","dependencies_parsed_at":"2022-08-30T14:31:38.476Z","dependency_job_id":"62ead916-08e8-45e2-bb08-7411cac09152","html_url":"https://github.com/go-rel/reltest","commit_stats":{"total_commits":63,"total_committers":5,"mean_commits":12.6,"dds":0.5238095238095238,"last_synced_commit":"58d6a4c7a11f06c81db9218a29dad8beb6bedf1f"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-rel%2Freltest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-rel%2Freltest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-rel%2Freltest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-rel%2Freltest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-rel","download_url":"https://codeload.github.com/go-rel/reltest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248449855,"owners_count":21105577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","hacktoberfest","orm","testing"],"created_at":"2024-11-07T07:19:07.284Z","updated_at":"2025-04-11T17:31:56.329Z","avatar_url":"https://github.com/go-rel.png","language":"Go","funding_links":["https://github.com/sponsors/Fs02"],"categories":[],"sub_categories":[],"readme":"# reltest\n\n[![GoDoc](https://godoc.org/github.com/go-rel/reltest?status.svg)](https://pkg.go.dev/github.com/go-rel/reltest)\n[![Test](https://github.com/go-rel/reltest/actions/workflows/test.yml/badge.svg)](https://github.com/go-rel/reltest/actions/workflows/test.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-rel/reltest)](https://goreportcard.com/report/github.com/go-rel/reltest)\n[![codecov](https://codecov.io/gh/go-rel/reltest/branch/main/graph/badge.svg?token=vxG9e5nJ3R)](https://codecov.io/gh/go-rel/reltest)\n[![Gitter chat](https://badges.gitter.im/go-rel/rel.png)](https://gitter.im/go-rel/rel)\n\nDatabase unit testing for Golang.\n\n## Example \n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/go-rel/rel/where\"\n\t\"github.com/go-rel/reltest\"\n)\n\ntype Movie struct {\n\tID    int\n\tTitle string\n}\n\nfunc main() {\n\tvar (\n\t\trepo = reltest.New()\n\t)\n\n\t// Mock query\n\trepo.ExpectFind(where.Eq(\"id\", 1)).Result(Movie{ID: 1, Title: \"Golang\"})\n\n\t// Application code\n\tvar movie Movie\n\trepo.MustFind(context.Background(), \u0026movie, where.Eq(\"id\", 1))\n\tfmt.Println(movie.Title)\n\t// Output: Golang\n}\n```\n\n**More Examples:**\n\n- [gin-example](https://github.com/go-rel/gin-example) - Todo Backend using Gin and REL\n- [go-todo-backend](https://github.com/Fs02/go-todo-backend) - Todo Backend using Chi and REL\n\n## License\n\nReleased under the [MIT License](https://github.com/go-rel/reltest/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-rel%2Freltest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-rel%2Freltest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-rel%2Freltest/lists"}