Skip to content

Commit

Permalink
test(db): add new expected args for SearchAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
hbollon committed May 25, 2022
1 parent 56dbee8 commit 8b154b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func TestSearchAttribute(t *testing.T) {
mock.ExpectQuery("^SELECT count(.+)").
WillReturnRows(sqlmock.NewRows([]string{"total"}).AddRow(1))
mock.ExpectQuery("^SELECT (.+)").
WithArgs("%test_thing%", "%baz%", "%woozles%", `%"confuzles"%`, 20).
WithArgs("%test_thing%", "%baz%", "%woozles%", `%"confuzles"%`, `%1.0.0%`, 20).
WillReturnRows(sqlmock.NewRows([]string{"path", "version_id", "tf_version"}).AddRow("path", "foo", "1.0.0"))

db := &db.Database{
Expand Down
2 changes: 1 addition & 1 deletion db/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ func TestSearchAttribute(t *testing.T) {
mock.ExpectQuery("^SELECT count(.+)").
WillReturnRows(sqlmock.NewRows([]string{"total"}).AddRow(1))
mock.ExpectQuery("^SELECT (.+)").
WithArgs("%test_thing%", "%baz%", "%woozles%", `%"confuzles"%`, 20).
WithArgs("%test_thing%", "%baz%", "%woozles%", `%"confuzles"%`, `%1.0.0%`, 20).
WillReturnRows(sqlmock.NewRows([]string{"path", "version_id", "tf_version"}).AddRow("path", "foo", "1.0.0"))

db := &Database{
Expand Down

0 comments on commit 8b154b5

Please sign in to comment.