File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
packages/google-cloud-firestore/tests Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1212 - args :
1313 - referenceValue : /books
1414 name : collection
15- - args : []
16- name : search
15+ - name : search
1716 options :
1817 limit :
1918 integerValue : ' 2'
4140 - args :
4241 - referenceValue : /books
4342 name : collection
44- - args : []
45- name : search
43+ - name : search
4644 options :
4745 limit :
4846 integerValue : ' 5'
8381 - args :
8482 - referenceValue : /books
8583 name : collection
86- - args : []
87- name : search
84+ - name : search
8885 options :
8986 query :
9087 functionValue :
Original file line number Diff line number Diff line change @@ -841,6 +841,12 @@ def test_search_query_enhancement_enum(self):
841841 assert pb_opts ["query_enhancement" ].string_value == "required"
842842
843843
844+ def test_search_string_field_coercion (self ):
845+ options = stages .SearchOptions (query = "tech" , select = ["title" ])
846+ assert len (options .select ) == 1
847+ assert isinstance (options .select [0 ], Field )
848+ assert options .select [0 ].path == "title"
849+
844850class TestSelect :
845851 def _make_one (self , * args , ** kwargs ):
846852 return stages .Select (* args , ** kwargs )
You can’t perform that action at this time.
0 commit comments