@@ -154,38 +154,9 @@ func TestFinder_e2e_FindOne(t *testing.T) {
154154 Age : 25 ,
155155 },
156156 },
157- {
158- name : "find by name with sort and skip" ,
159- before : func (ctx context.Context , t * testing.T ) {
160- insertOneResult , err := collection .InsertMany (ctx , []* TestUser {
161- & TestUser {
162- Name : "Mingyong Chen" ,
163- Age : 24 ,
164- },
165- & TestUser {
166- Name : "Mingyong Chen" ,
167- Age : 25 ,
168- },
169- })
170- require .NoError (t , err )
171- require .NotNil (t , insertOneResult .InsertedIDs )
172- },
173- after : func (ctx context.Context , t * testing.T ) {
174- deleteOneResult , err := collection .DeleteMany (ctx , query .Eq ("name" , "Mingyong Chen" ))
175- require .NoError (t , err )
176- require .Equal (t , int64 (2 ), deleteOneResult .DeletedCount )
177- },
178- filter : query .Eq ("name" , "Mingyong Chen" ),
179- sort : bsonx .StringSortToBsonD ("-age" ),
180- skip : 1 ,
181- want : & TestUser {
182- Name : "Mingyong Chen" ,
183- Age : 24 ,
184- },
185- },
186157
187158 {
188- name : "find by name and sort, limit not effect in find one" ,
159+ name : "find by name and sort, limit and skip will not effect in find one" ,
189160 before : func (ctx context.Context , t * testing.T ) {
190161 insertOneResult , err := collection .InsertMany (ctx , []* TestUser {
191162 & TestUser {
@@ -211,7 +182,7 @@ func TestFinder_e2e_FindOne(t *testing.T) {
211182 limit : 2 ,
212183 want : & TestUser {
213184 Name : "Mingyong Chen" ,
214- Age : 24 ,
185+ Age : 25 ,
215186 },
216187 },
217188
0 commit comments