Skip to content

Commit 3ad3eda

Browse files
improvement(finder): improve the method DistinctWithParse's test
1 parent f848c5d commit 3ad3eda

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

finder/finder_e2e_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,4 +876,9 @@ func TestFinder_e2e_DistinctWithParse(t *testing.T) {
876876
assert.ElementsMatch(t, tc.want, tc.result)
877877
})
878878
}
879+
t.Run("parse error", func(t *testing.T) {
880+
var result []int
881+
err := finder.Filter(bson.D{}).DistinctWithParse(context.Background(), "name", result)
882+
assert.Error(t, err)
883+
})
879884
}

0 commit comments

Comments
 (0)