Skip to content

Latest commit

History

76 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

reltest

GoDocTestGo Report CardcodecovGitter chat

Database unit testing for Golang.

Example

package main
import (
"context""fmt""github.com/go-rel/rel/where""github.com/go-rel/reltest"
)
typeMoviestruct {
IDintTitlestring
}
funcmain() {
var (
repo=reltest.New()
)
// Mock queryrepo.ExpectFind(where.Eq("id", 1)).Result(Movie{ID: 1, Title: "Golang"})
// Application codevarmovieMovierepo.MustFind(context.Background(), &movie, where.Eq("id", 1))
fmt.Println(movie.Title)
// Output: Golang
}

More Examples:

License

Released under the MIT License

About

Database unit testing for Golang

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages