Releases: Selvatico/go-mocket
Releases · Selvatico/go-mocket
v1.0.7 – Documentation Update
v1.0.6 – Fixed Linting Issues
Linting issues were fixed and we now have an A+ on the Go Report Card
v1.0.5 – Readme update
Documentation was moved in the code (see DOCUMENTATION.md)
And a failing test was fixed
v1.0.4
v1.0.3
Support of any error type to be mocked as a result
WithError allows to set an error to any matched query.
For example
functionality_test.go
...
// in tests you write following
Mock.NewMock().WithQuery(`SELECT * FROM "campaign"`).WithError(sql.ErrNoRows)
// rest part of test
...
functionality.go
...
// in order to be able to test following functionality in your code
if err:=DB.Find(&a, Campaign{UUID: uuid}).Error; err == sql.ErrNoRows {
//some code here
}
...
v1.0.2
Safe register
- Added safe register functionality
First release
v1.0.0 insert id tests