Skip to content

Commit

Permalink
test: fix the unit test for the repo matter
Browse files Browse the repository at this point in the history
Signed-off-by: saltbo <saltbo@foxmail.com>
  • Loading branch information
saltbo committed Jul 30, 2023
1 parent 3cad047 commit 4e67770
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/app/repo/matter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestMatterDBQuery_Update(t *testing.T) {
expectChildrenArgs: []driver.Value{"dir0/dir1/", "dir0/dir1-1/", nowFunc(), "dir0/dir1/%"},
expectChildrenResult: sqlmock.NewResult(1, 1),

expectMainArgs: []driver.Value{"dir1-1", "dir0/", nowFunc(), 1},
expectMainArgs: []driver.Value{"dir1-1", "dir0/", nil, nowFunc(), 1},
expectMainResult: sqlmock.NewResult(1, 1),
},
"update parent with children": {
Expand All @@ -76,7 +76,7 @@ func TestMatterDBQuery_Update(t *testing.T) {
expectChildrenArgs: []driver.Value{"dir2/", "dir1/dir2/", nowFunc(), "dir2/%"},
expectChildrenResult: sqlmock.NewResult(1, 1),

expectMainArgs: []driver.Value{"dir2", "dir1/", nowFunc(), 2},
expectMainArgs: []driver.Value{"dir2", "dir1/", nil, nowFunc(), 2},
expectMainResult: sqlmock.NewResult(1, 1),
},
}
Expand Down
2 changes: 1 addition & 1 deletion internal/app/wire_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e67770

Please sign in to comment.