Skip to content

Commit

Permalink
Bump github.com/DATA-DOG/go-sqlmock from 1.5.0 to 1.5.1 in /src/backe…
Browse files Browse the repository at this point in the history
…nd (#208)

* Bump github.com/DATA-DOG/go-sqlmock from 1.5.0 to 1.5.1 in /src/backend

Bumps [github.com/DATA-DOG/go-sqlmock](https://github.com/DATA-DOG/go-sqlmock) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/DATA-DOG/go-sqlmock/releases)
- [Commits](DATA-DOG/go-sqlmock@v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: github.com/DATA-DOG/go-sqlmock
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use stricter argument checks in tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Schlachter <david@schlachter.ca>
  • Loading branch information
dependabot[bot] and davidschlachter authored Dec 31, 2023
1 parent 6b8e2b2 commit 24af01a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/backend/budget/budget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func TestHandle(t *testing.T) {
mock.ExpectQuery(`SELECT id, start, end, reporting_interval FROM budgets;`).
WillReturnRows(sqlmock.NewRows([]string{"id", "start", "end", "reporting_interval"}).
AddRow(1, "2021-01-01 00:00:00", "2021-12-31 23:59:59", 0))
mock.ExpectQuery(`SELECT id, start, end, reporting_interval FROM budgets WHERE id`).
WillReturnRows(sqlmock.NewRows([]string{"id", "start", "end", "reporting_interval"}).
AddRow(1, "2021-01-01 00:00:00", "2021-12-31 23:59:59", 0))
mock.ExpectQuery(`SELECT id, start, end, reporting_interval FROM budgets WHERE id = \?;`).
WithArgs("1").WillReturnRows(sqlmock.NewRows([]string{"id", "start", "end", "reporting_interval"}).
AddRow(1, "2021-01-01 00:00:00", "2021-12-31 23:59:59", 0))
mock.ExpectExec(`REPLACE INTO budgets`).
WithArgs(1, "2022-01-01 00:00:00", "2022-12-31 23:59:59", 0).
WillReturnResult(sqlmock.NewResult(1, 1))
Expand Down
6 changes: 3 additions & 3 deletions src/backend/categorybudget/categorybudget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func TestHandle(t *testing.T) {
WillReturnRows(sqlmock.NewRows([]string{"id", "budget", "category", "amount"}).
AddRow(1, 1, 1, "1000"))
// Fetch
mock.ExpectQuery(`SELECT id, budget, category, amount FROM category_budgets WHERE id`).
WillReturnRows(sqlmock.NewRows([]string{"id", "budget", "category", "amount"}).
AddRow(1, 1, 1, "1000"))
mock.ExpectQuery(`SELECT id, budget, category, amount FROM category_budgets WHERE id = \?;`).
WithArgs("1").WillReturnRows(sqlmock.NewRows([]string{"id", "budget", "category", "amount"}).
AddRow(1, 1, 1, "1000"))
// Delete
mock.ExpectExec(`DELETE FROM category_budgets WHERE id`).WithArgs(1).
WillReturnResult(sqlmock.NewResult(1, 1))
Expand Down
2 changes: 1 addition & 1 deletion src/backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/davidschlachter/lychnos/src/backend
go 1.21

require (
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/DATA-DOG/go-sqlmock v1.5.1
github.com/go-sql-driver/mysql v1.7.1
github.com/mattn/go-sqlite3 v1.14.19
github.com/shopspring/decimal v1.3.1
Expand Down
5 changes: 3 additions & 2 deletions src/backend/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DATA-DOG/go-sqlmock v1.5.1 h1:FK6RCIUSfmbnI/imIICmboyQBkOckutaa6R5YYlLZyo=
github.com/DATA-DOG/go-sqlmock v1.5.1/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE=
github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI=
github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
Expand Down

0 comments on commit 24af01a

Please sign in to comment.